Enum ImageFormat
- java.lang.Object
-
- java.lang.Enum<ImageFormat>
-
- com.microblink.documentverification.image.ImageFormat
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ImageFormat>
public enum ImageFormat extends java.lang.Enum<ImageFormat>
Represents a format of image that is being returned.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageFormatvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ImageFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static ImageFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageFormat c : ImageFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-