Class ImageWriter

  • All Implemented Interfaces:
    AutoCloseable

    public final class ImageWriter
    extends Object
    implements AutoCloseable
    ImageWriter class Represents the ability to write image data, for use as input to Vision AI operations.

    Note: close() must be called in order to release underlying resources held by the object.

    • Method Detail

      • write

        public void write​(ByteBuffer image)
        Writes a single image to the internal buffer.

        When used with ImageAnalyzer, the image needs to be in a format that's supported by the Image Analysis service, such as JPEG, PNG or BMP. See full list of supported formats. The SDK sends the image buffer as-is to the service. No format conversion is done.

        Parameters:
        image - The image to be written as ByteBuffer
      • close

        public void close()
        Dispose of associated resources. Note: close() must be called in order to release underlying resources held by the object.
        Specified by:
        close in interface AutoCloseable