A typical use case is the usage within an HTML page in combination with an img
tag and a preview image generated by the web service. The great advantage is that using a preview image created and updated by ImagePreview
and ImageCapture
will delegate the differentiation whether an image was captured or not to the SDK. This is very helpful in the HTML use case where it may be difficult to implement such a preview logic.
In a similar way, you may also use a fix file reference in a Windows application which binds an image preview control in a dialog to a (temporary) image file.
The extended usage of PreviewImage
allows image preview creation from custom default symbolic images and/or an existing person's image. This is supported by specifying one or two default image sources. Each of these image sources may be a file reference, an URL or a BASE64 encoded image.
The basic use case, without providing own default images is the following:
- If an image was captured, this is the one that is returned as preview image.
- If no image was captured, the SDK's symbolic image is returned.
The extended use case, providing own default images can be illustrated in this way:
Note that without providing default images, the sequence falls back automatically to the basic use case.