ImageSourceAdapter
The abstract class ImageSourceAdapter is an abstract class for implementing image fetching and delivering features.
Default implementations:
- CameraEnhancer: Use the camera as the image source for scanning from the video input.
Definition
Assembly: dynamsoft-capture-vision-react-native
abstract class ImageSourceAdapter
Methods
| Method | Description |
|---|---|
addImageToBuffer |
Adds an image to the internal buffer. |
clearBuffer |
Clears all images from the buffer. |
destroy |
Destroy native instance. This object is no longer available after destroy(). |
getColourChannelUsageType |
Get the current usage type for color channels in images. |
getImageCount |
Get the current number of images in the buffer. |
getImageData |
Get a buffered image. |
getMaximumImageCount |
Get the maximum number of images that can be buffered. |
isBufferEmpty |
Determines whether the buffer is empty. |
setColourChannelUsageType |
Sets the usage type for color channels in images. |
setMaximumImageCount |
Sets the maximum number of images that can be buffered at any time. |
startFetching |
Start fetching images from the source to the Video Buffer of ImageSourceAdapter. |
stopFetching |
Stop fetching images from the source to the Video Buffer of ImageSourceAdapter. |
addImageToBuffer
Adds an image to the internal buffer.
addImageToBuffer(imageData: ImageData): void
clearBuffer
Clears all images from the buffer.
clearBuffer(): Promise<void>
destroy
Destroy native instance. This object is no longer available after destroy().
destroy(): void
getColourChannelUsageType
Get the current usage type for color channels in images.
getColourChannelUsageType(): Promise<EnumColourChannelUsageType>
getImageCount
Get the current number of images in the buffer.
getImageCount(): Promise<number>
getImageData
Get a buffered image.
getImageData(): undefined | null | ImageData
getMaximumImageCount
Get the maximum number of images that can be buffered.
getMaximumImageCount(): Promise<number>
isBufferEmpty
Determines whether the buffer is empty.
isBufferEmpty(): Promise<boolean>
setColourChannelUsageType
Sets the usage type for color channels in images.
setColourChannelUsageType(type: EnumColourChannelUsageType): Promise<void>
setMaximumImageCount
Sets the maximum number of images that can be buffered at any time.
setMaximumImageCount(count: number): Promise<void>
startFetching
Start fetching images from the source to the Video Buffer of ImageSourceAdapter.
startFetching(): void
stopFetching
Stop fetching images from the source to the Video Buffer of ImageSourceAdapter.
stopFetching(): void