IStoredImageHandle.RequestPreviewAsync Method
Definition
Namespace: P1.CameraSdk
Request the preview (thumbnail) for an image.
public void RequestPreviewAsync(ImageFormat format = ImageFormat.RGB24);
A preview is a scaled down version of the entire image, encoded as either a RGB bitmap or as an complete jpeg file.Depending on the requested fileFormat
format, the camera might be able to use any existing preview (thumbnail) present inside the image’s IIQ file.
The RGB previews can be stored inside the IIQ files. This method returns the stored preview, if it exists, or generates a new one if not. If you ask for a Jpeg formatted preview, the generated or stored RGB preview is converted to Jpeg (on the camera), before being returned to you. Jpeg previews are not cached.
Jpegs are significantly smaller in file size, but time consuming to encode. Prefer Jpeg if you are connected to the camera over a slow connection, like an outdoor Wifi.
The dimensions of the preview is controlled by the camera.
The requested preview image object is returned by a notification. To retrieve the object, you must listen for the EventType.CameraPreviewReady notification, before calling this method.
Parameters:
format |
Optionally change encoding of the returned preview image. Default is RGB bitmap. |