ImageFrameSource
Defined in framework ScanditDataCaptureCore
- SDCImageFrameSource
@interface SDCImageFrameSource : NSObject <SDCFrameSource>
Added in version 6.3.0
To emit the frame set this object as the frame source for the SDCDataCaptureContext and turn it on by changing the desired state to SDCFrameSourceStateOn. This frame source will turn off automatically after the frame is emitted.
Note
When using SDCImageFrameSource with SDCTextCapture you should change the SDCTextCaptureSettings.recognitionDirection to SDCDirectionLeftToRight.
- + imageFrameSourceFromJSONString:error:
+ (nullable
instancetype
)imageFrameSourceFromJSONString:(nonnull NSString *)JSONString error:(NSError **)errorAdded in version 6.14.0
Constructs a new SDCImageFrameSource from the provided JSON, which should have the format {“image”:”<base64>”}, where <base64> is the Base64 encoding of an image.
- + frameSourceWithImage:
+ (nonnull
instancetype
)frameSourceWithImage:(nonnull UIImage *)imageAdded in version 6.3.0
Constructs a new SDCImageFrameSource 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
- - switchToDesiredState:
- (
void
)switchToDesiredState:(SDCFrameSourceState)stateAdded in version 6.3.0
Convenience method for SDCFrameSource.switchToDesiredState:completionHandler:: it is same as calling SDCFrameSource.switchToDesiredState:completionHandler: with the second argument set to nil.