Class ImageFrame

java.lang.Object
com.digimarc.dms.readers.ImageFrame

public class ImageFrame extends Object
The ImageFrame class is used to return camera image frames from the SDK to the application. These frames are returned within ReaderResult objects and contain the image read occurred in. These frames will require processing before they can be handled as normal bitmaps. The BitmapUtils class contains several methods for converting the images to scaled ARGB thumbnail images.
  • Constructor Details

    • ImageFrame

      public ImageFrame(@NonNull ImagePlane[] data, int width, int height, @NonNull CaptureFormat format)
      Create an ImageFrame object. This will use the data passed in for its storage, so any changes to the buffer outside of this object will affect this object's contents.
      Parameters:
      data - Image data.
      width - Image width.
      height - Image height.
      format - Image format.
  • Method Details

    • copy

      public boolean copy(@NonNull ImageFrame frame)
      Copy the contents of a frame into this object.
      Parameters:
      frame - Frame to copy.
      Returns:
      True if the copy was successful. False if either a null frame was passed in or if this object's buffer wasn't large enough to hold the new frame.
    • createCopy

      @Nullable public ImageFrame createCopy()
      Create a deep copy of this object. New memory allocations will be made and original contents will be copied.
      Returns:
      A new deep copy of this object.
    • getImageBuffer

      @NonNull public ImagePlane[] getImageBuffer()
    • getImageWidth

      public int getImageWidth()
    • getImageHeight

      public int getImageHeight()
    • getImageDimensions

      @NonNull public android.graphics.Point getImageDimensions()
    • getImageFormat

      public int getImageFormat()