Single image uploader
Defined under the namespace Scandit.Datacapture.Core
- SingleImageUploader
class SingleImageUploader : FrameSource
Added in version 6.13.0
The SingleImageUploader class can be used as a frame source when no camera is available or when the browser does not meet technical requirements. The user will be presented with a simple UI to pick and analyse an image on the device.
- desiredState
get desiredState(): FrameSourceState
Added in version 6.13.0
- settings
get settings(): SingleImageUploaderSettings
Added in version 6.13.0
Implemented from FrameSource. See FrameSource.desiredState.
- getCurrentState()
getCurrentState(): FrameSourceState
Added in version 6.13.0
Implemented from FrameSource. See FrameSource.getCurrentState.
Note that for this particular frame source, the states have a slighlity different meaning: * FrameSourceState.Starting means the frame source is ready to be used * FrameSourceState.On means an image has been submitted and is being analysed.
- addListener(listener)
addListener(listener: FrameSourceListener | null):
void
Added in version 6.13.0
Implemented from FrameSource. See FrameSource.addListener().
- removeListener(listener)
removeListener(listener: FrameSourceListener | null):
void
Added in version 6.13.0
Implemented from FrameSource. See FrameSource.removeListener().
- default()
static get default(): SingleImageUploader
Added in version 6.13.0
Gets the default uploader.
- switchToDesiredState(state)
switchToDesiredState(state: FrameSourceState): Promise<
void
>Added in version 6.13.0
Implemented from FrameSource. See FrameSource.switchToDesiredState().
- applySettings(settings)
applySettings(settings: SingleImageUploaderSettings): Promise<
void
>Added in version 6.13.0
- getLastUploadedImage()
getLastUploadedImage(): ImageData | null
Added in version 6.15.0
Deprecated since version 6.17.0: use IdCaptureListener.didUpdateSession() instead, it provides the frame data of all processed frames, including the ones processed by the SingleImageUploader
Get the data from the last processed image. The data is returned as an ImageData object. If no image was ever processed, null is returned.
- SingleImageUploaderSettings
class SingleImageUploaderSettings
Added in version 6.13.0
- constructor()
constructor()
Added in version 6.13.0
Constructs a new SingleImageUploaderSettings object with default settings.
- constructor(settings)
constructor(settings: SingleImageUploaderSettings)
Added in version 6.13.0
Creates a copy of the passed settings.
- iconElement
iconElement: HTMLElement
Added in version 6.13.0
An HTML or SVG element representing the icon.
- informationElement
informationElement: HTMLElement
Added in version 6.13.0
An HTML element informing the user about the process.
- buttonElement
buttonElement: HTMLElement
Added in version 6.13.0
An HTML element representing the button the user can click to analyse an image.
- containerStyle
containerStyle: CSS.Properties
Added in version 6.13.0
An object of CSS properties to style the container element wrapping the icon, information and button elements.
- iconStyle
iconStyle: CSS.Properties
Added in version 6.13.0
An object of CSS properties to style the icon element.
- informationStyle
informationStyle: CSS.Properties
Added in version 6.13.0
An object of CSS properties to style the information element.
- buttonStyle
buttonStyle: CSS.Properties
Added in version 6.13.0
An object of CSS properties to style the button element.