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_flutter
abstract class ImageSourceAdapter
Methods
| Method | Description |
|---|---|
addImageToBuffer |
Adds an image to the internal buffer. |
clearBuffer |
Clears all images from the buffer. |
getBufferOverflowProtectionMode |
Get the current mode for handling buffer overflow. |
getColourChannelUsageType |
Get the current usage type for color channels in images. |
getImage |
Get a buffered image. Implementing classes should return a Promise that resolves with an instance of ImageData. |
getMaximumImageCount |
Get the maximum number of images that can be buffered. |
hasImage |
Checks if an image with the specified ID is present in the buffer. |
setBufferOverflowProtectionMode |
Sets the behavior for handling new incoming images when the buffer is full. |
setColourChannelUsageType |
Sets the usage type for color channels in images. |
setMaximumImageCount |
Sets the maximum number of images that can be buffered at any time. |
setNextImageToReturn |
Sets the processing priority of a specific image. This can affect the order in which images are returned by getImage. |
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.
Future<void> addImageToBuffer(ImageData image);
clearBuffer
Clears all images from the buffer.
Future<void> clearBuffer();
getBufferOverflowProtectionMode
Get the current mode for handling buffer overflow.
Future<EnumBufferOverflowProtectionMode> getBufferOverflowProtectionMode() async;
getColourChannelUsageType
Get the current usage type for color channels in images.
Future<EnumColourChannelUsageType> getColourChannelUsageType();
getImage
Get a buffered image. Implementing classes should return a Promise that resolves with an instance of ImageData.
Future<ImageData?> getImage() async;
getMaximumImageCount
Get the maximum number of images that can be buffered.
Future<int> getMaximumImageCount();
hasImage
Checks if an image with the specified ID is present in the buffer.
Future<bool> hasImage(int imageId);
setBufferOverflowProtectionMode
Sets the behavior for handling new incoming images when the buffer is full.
Future<void> setBufferOverflowProtectionMode(EnumBufferOverflowProtectionMode mode);
setColourChannelUsageType
Sets the usage type for color channels in images.
Future<void> setColourChannelUsageType(EnumColourChannelUsageType type);
setMaximumImageCount
Sets the maximum number of images that can be buffered at any time.
Future<void> setMaximumImageCount(int count);
setNextImageToReturn
Sets the processing priority of a specific image. This can affect the order in which images are returned by getImage.
Future<bool> setNextImageToReturn(int imageId, bool keepInBuffer);
startFetching
Start fetching images from the source to the Video Buffer of ImageSourceAdapter.
Future<void> startFetching();
stopFetching
Stop fetching images from the source to the Video Buffer of ImageSourceAdapter.
Future<void> stopFetching();