Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
ImageData
The ImageData
class represents image data, which contains the image bytes, width, height, stride, pixel format, orientation and a tag.
Definition
Namespace: com.dynamsoft.core.basic_structures
Assembly: DynamsoftCore.aar
class ImageData
Attributes
Attributes | Type | Description |
---|---|---|
bytes |
byte[] | The image data content in a byte array. |
width |
int | The width of the image in pixels. |
height |
int | The height of the image in pixels. |
stride |
int | The stride (or scan width) of the image. |
format |
EnumImagePixelFormat | The image pixel format used in the image byte array. |
orientation |
int | The orientation information of the image. The library is able to read the orientation information from the EXIF data of the image file. |
tag |
ImageTag | The tag of the image. |
Methods
Method | Description |
---|---|
toBitmap |
Transform the ImageData to an android.graphics.Bitmap . |
toString |
Transform the ImageData to a string. |
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 information of the image. The library is able to read the orientation information from the EXIF data of the image file.
int orientation;
tag
The tag of the image.
ImageTag tag;
toBitmap
Transform the ImageData to a android.graphics.Bitmap
.
Bitmap toBitmap() throws CoreException;
Exception
Error Code | Value | Description |
---|---|---|
EC_BPP_NOT_SUPPORTED | -10007 | The pixel format is not supported or the ImageData is invalid. |
Return Value
An android.graphics.Bitmap
that converted from the ImageData
.
toString
Transform the ImageData
to a string.
String toString();
Return Value
A String that converted from the ImageData
.