Image Frame Source
Defined in framework ScanditCaptureCore
- ImageFrameSource
open class ImageFrameSource : NSObject, FrameSource
Added in version 6.3.0
To emit the frame set this object as the frame source for the DataCaptureContext and turn it on by changing the desired state to FrameSourceState.on. This frame source will turn off automatically after the frame is emitted.
- init
convenience init(fromJSONString JSONString: String) throws
Added in version 6.14.0
Constructs a new ImageFrameSource from the provided JSON, which should have the format {“image”:”<base64>”}, where <base64> is the Base64 encoding of an image.
- init
convenience init(image: UIImage)
Added in version 6.3.0
Constructs a new ImageFrameSource from the provided UIImage.
The provided UIImage should have one of the following configuration:
Gray color space:
8 bits per pixel
8 bits per component
kCGImageAlphaNone
RGB color space:
32 bits per pixel
8 bits per component
kCGImageAlphaNoneSkipFirst
32 bits per pixel
8 bits per component
kCGImageAlphaNoneSkipLast
32 bits per pixel
8 bits per component
kCGImageAlphaPremultipliedFirst
32 bits per pixel
8 bits per component
kCGImageAlphaPremultipliedLast
- `switch`
open func `switch`(toDesiredState state: FrameSourceState) async ->
BoolAdded in version 6.3.0
Implemented from FrameSource. See FrameSource.`switch`().
- `switch`
open func `switch`(toDesiredState state: FrameSourceState) ->
VoidAdded in version 6.3.0
Convenience method for FrameSource.`switch`(): it is same as calling FrameSource.`switch`() with the second argument set to null.