ImageData
Stores the image data.
class com.dynamsoft.core.ImageData
Attributes
Attribute | Type | Description |
---|---|---|
bytes |
byte[] | The array of bytes that stores the pixel buffer of the image. |
width |
int | The width of the image in pixels. |
height |
int | The height of the image in pixels. |
stride |
int | The stride is measured by the byte length of each line in the pixel buffer. |
format |
int | The image pixel format used in the image byte array. View EnumImagePixelFormat for all supported image pixel formats. |
orientation |
int | The orientation of the image buffer contained in this frame data. |
Methods
Method | Description |
---|---|
toBitmap |
Convert the ImageData object to a Bitmap object. |
bytes
The image data content in a byte array.
byte[] bytes
width
The width of the image in pixels.
int width
height
The height of the image in pixels.
int height
stride
The stride (or scan width) of the image.
int stride
format
The image pixel format used in the image byte array.
int format
orientation
The orientation of the image buffer contained in this frame data. The value is the angle that the camera image needs to be rotated clockwise so it shows correctly on the display in its natural orientation. It is 0, 90, 180, or 270. A typical value for this is 90 as most camera modules record the frames in landscape right orientation. Rotating a landscape right frame by 90 degrees will show it correctly on the display in portrait orientation (which is the natural device orientation of most phones).
int orientation
toBitmap
Convert the ImageData
object to a Bitmap
object.
Bitmap toBitmap() throws CoreException
Return Value
A Bitmap object.