Enum Class ImageFormat

java.lang.Object
java.lang.Enum<ImageFormat>
com.microblink.blinkid.image.ImageFormat
All Implemented Interfaces:
Serializable, Comparable<ImageFormat>, Constable

public enum ImageFormat extends Enum<ImageFormat>
Represents a format of image that is being returned.
  • Enum Constant Details

    • ALPHA_8

      public static final ImageFormat ALPHA_8
      A single plane, grayscale image. Each pixel is represented with single byte. Pixel stride of image plane in this format is 1, while row stride can vary (it does not have to be equal to image width).
    • BGRA_8888

      public static final ImageFormat BGRA_8888
      A single plane, color image. Each pixel is represented with 4 bytes in BGRA order. Pixel stride of image plane in this format is 1, while row stride can vary (it does not have to be equal to image width).
    • YUV_NV21

      public static final ImageFormat YUV_NV21
      A single plane, color image. First width*height elements of buffer are Y bytes and next width * height / 2 elements of buffer are V and U bytes. This format does not support strides (neither pixel nor row strides). This means that image plane of image in YUV_NV21 format will have row stride equal to width and pixel stride 1.
    • BGR

      public static final ImageFormat BGR
      A single plane, color image. Each pixel is represented with 3 bytes in BGR order. Pixel stride of image plane in this format is 1, while row stride can vary (it does not have to be equal to image width).
    • YUV_NV12

      public static final ImageFormat YUV_NV12
      A single plane, color image. First width*height elements of buffer are Y bytes and next width * height / 2 elements of buffer are U and V bytes. This format does not support strides (neither pixel nor row strides). This means that image plane of image in YUV_NV12 format will have row stride equal to width and pixel stride 1.
  • Method Details

    • values

      public static ImageFormat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImageFormat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null