Deprecation warning
Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.
We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.
You'll find the updated documentation at: Data Capture SDK Documentation for Android
Inherits NativeHandle.
Public Member Functions | |
ImageDescription () | |
void | setWidth (int width) |
int | getWidth () |
int | getHeight () |
void | setHeight (int height) |
int | getFirstPlaneOffset () |
void | setFirstPlaneOffset (int offset) |
int | getFirstPlaneRowBytes () |
void | setFirstPlaneRowBytes (int bytesPerRow) |
int | getSecondPlaneOffset () |
void | setSecondPlaneOffset (int offset) |
int | getSecondPlaneRowBytes () |
void | setSecondPlaneByteRowBytes (int bytesPerRow) |
void | setLayout (int layout) |
int | getLayout () |
long | getMemorySize () |
void | setMemorySize (int bufferSize) |
Static Public Attributes | |
Image Layouts (Pixel Formats) | |
static final int | IMAGE_LAYOUT_UNKNOWN |
static final int | IMAGE_LAYOUT_GRAY_8U |
static final int | IMAGE_LAYOUT_RGB_8U |
static final int | IMAGE_LAYOUT_RGBA_8U |
static final int | IMAGE_LAYOUT_YPCBCR_8U |
static final int | IMAGE_LAYOUT_YPCRCB_8U |
static final int | IMAGE_LAYOUT_YUYV_8U |
Detailed Description
Describes dimensions as well as internal memory layout of an image buffer.
Depending on the image layout different properties must be set. All image layouts require at least width, height and memory size. Bi-planar formats (IMAGE_LAYOUT_YPCRCB_8U, IMAGE_LAYOUT_YPCBCR_8U) additionally require bytes per row as well as data plane offsets for both planes.
The following code snippet shows how to create an image description for an 8-bit grey-scale image:
- Since
- 4.7.0
Constructor & Destructor Documentation
ImageDescription | ( | ) |
Create a new image description.
All fields are initialized to zero and the image layout set to IMAGE_LAYOUT_UNKNOWN.
- Since
- 4.7.0
Member Function Documentation
void setWidth | ( | int | width | ) |
Set width of image.
- Parameters
-
width width in pixels
- Since
- 4.7.0
int getWidth | ( | ) |
Get width of image.
- Returns
- The width of the image in pixels.
- Since
- 4.7.0
int getHeight | ( | ) |
Get height of image.
- Returns
- The height of the image in pixels.
- Since
- 4.7.0
void setHeight | ( | int | height | ) |
Set height of image.
- Parameters
-
height height in pixels
- Since
- 4.7.0
int getFirstPlaneOffset | ( | ) |
Get start offset of the first data plane.
- Returns
- The start offset of the first data plane.
- Since
- 4.7.0
void setFirstPlaneOffset | ( | int | offset | ) |
Set the start offset of the first data plane.
- Parameters
-
offset The offset as measured from the beginning of the data buffer.
- Since
- 4.7.0
int getFirstPlaneRowBytes | ( | ) |
Get the number of bytes per row for the first data plane.
- Returns
- The number of bytes per row.
- Since
- 4.7.0
void setFirstPlaneRowBytes | ( | int | bytesPerRow | ) |
Set the number of bytes per row for first data plane.
- Parameters
-
bytesPerRow The number of bytes.
- Since
- 4.7.0
int getSecondPlaneOffset | ( | ) |
Get the start offset of the second data plane.
- Returns
- The start offset of the second data plane.
- Since
- 4.7.0
void setSecondPlaneOffset | ( | int | offset | ) |
Set the start offset of the second data plane.
- Parameters
-
offset The number of bytes per row.
- Since
- 4.7.0
int getSecondPlaneRowBytes | ( | ) |
Get the number of bytes per row for the second data plane.
- Returns
- The number of bytes per row of the second plane
- Since
- 4.7.0
void setSecondPlaneByteRowBytes | ( | int | bytesPerRow | ) |
Set the number of bytes per row for the second data plane.
- Parameters
-
bytesPerRow the number of bytes per row.
- Since
- 4.7.0
void setLayout | ( | int | layout | ) |
int getLayout | ( | ) |
Get the image layout.
The image layout describes the format of the pixel data.
The default format is IMAGE_LAYOUT_UNKNOWN.
- Returns
- returns the image description's image layout
- Since
- 4.7.0
long getMemorySize | ( | ) |
Get the total memory size of the frame data.
- Returns
- The total size of the image buffer in bytes.
- Since
- 4.7.0
void setMemorySize | ( | int | bufferSize | ) |
Set the total memory size of the frame data.
- Parameters
-
bufferSize The total memory size of the frame data.
- Since
- 4.7.0
Member Data Documentation
|
static |
Image layout is unknown.
|
static |
Single-channel 8-bit gray scale image.
When using this pixel layout the width/height and memory size properties of the ImageDescription must be set.
|
static |
RGB image with 8bit per color channel.
When using this pixel layout the width/height and memory size properties of the ImageDescription must be set.
|
static |
RGBA image with 8bit per color channel.
When using this pixel layout the width/height and memory size properties of the ImageDescription must be set.
|
static |
YpCbCr 4:2:0 image format.
A bi-planar format with separate Y and CbCr planes.
When using this pixel layout the width, height, memory size as well as the number of bytes per row and the offsets of both data planes must be set.
|
static |
YpCrCb 4:2:0 image format.
A bi-planar format with separate Y and CrCb planes.
When using this pixel layout the width, height, memory size as well as the number of bytes per row and the offsets of both data planes must be set.
|
static |
8-bit YUYV 4:2:2 image format.
The Y, U and V samples are packed together in one image plane. UV are shared between two adjacent pixels in a row.
When using this pixel layout the width/height and memory size properties of the ImageDescription must be set.
The documentation for this class was generated from the following file:
- ImageDescription.java