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

ScImageDescription Struct Reference

Public Member Functions

ScImageDescriptionsc_image_description_new ()
 
void sc_image_description_retain (ScImageDescription *description)
 
void sc_image_description_release (ScImageDescription *description)
 
ScImageLayout sc_image_description_get_layout (const ScImageDescription *description)
 
void sc_image_description_set_layout (ScImageDescription *description, ScImageLayout layout)
 
uint32_t sc_image_description_get_width (const ScImageDescription *description)
 
void sc_image_description_set_width (ScImageDescription *description, uint32_t width)
 
uint32_t sc_image_description_get_height (const ScImageDescription *description)
 
void sc_image_description_set_height (ScImageDescription *description, uint32_t height)
 
uint32_t sc_image_description_get_first_plane_offset (const ScImageDescription *description)
 
void sc_image_description_set_first_plane_offset (ScImageDescription *description, uint32_t offset)
 
uint32_t sc_image_description_get_first_plane_row_bytes (const ScImageDescription *description)
 
void sc_image_description_set_first_plane_row_bytes (ScImageDescription *description, uint32_t row_bytes)
 
uint32_t sc_image_description_get_second_plane_row_bytes (const ScImageDescription *description)
 
void sc_image_description_set_second_plane_row_bytes (ScImageDescription *description, uint32_t row_bytes)
 
uint32_t sc_image_description_get_second_plane_offset (const ScImageDescription *description)
 
void sc_image_description_set_second_plane_offset (ScImageDescription *description, uint32_t offset)
 
uint32_t sc_image_description_get_memory_size (const ScImageDescription *description)
 
void sc_image_description_set_memory_size (ScImageDescription *description, uint32_t memory_size)
 

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 (SC_IMAGE_LAYOUT_YPCRCB_8U, SC_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.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.

Member Function Documentation

ScImageDescription * sc_image_description_new ( )

Create a new image description.

All fields are initialized to zero and the image layout set to SC_IMAGE_LAYOUT_UNKNOWN.

Returns
the newly created image description. After use, the image description must be released with sc_image_description_release().
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.
void sc_image_description_retain ( ScImageDescription description)

Increase reference count of image description by one.

Parameters
descriptionThe image description object. Must not be null.
Since
4.6.0
void sc_image_description_release ( ScImageDescription description)

Decrease reference count of image description by one.

When the reference count drops to zero, the image description is deallocated.

Parameters
descriptionthe description object. May be null.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.
ScImageLayout sc_image_description_get_layout ( const ScImageDescription description)

Get the image layout.

The image layout describes the format of the pixel data. All values of ScImageLayout are accepted.

The default format is SC_IMAGE_LAYOUT_UNKNOWN.

Parameters
descriptionthe description object. Must not be null
Returns
returns the image description's image layout
The image currently set image layout.
Since
4.6.0
void sc_image_description_set_layout ( ScImageDescription description,
ScImageLayout  layout 
)

Set the image layout.

Parameters
descriptionthe description object. Must not be null
layoutthe new image layout
See also
sc_image_description_get_layout
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerDemo.c.
uint32_t sc_image_description_get_width ( const ScImageDescription description)

Get width of image.

Parameters
descriptionthe description object. Must not be null
Returns
The width of the image in pixels.
Since
4.6.0
void sc_image_description_set_width ( ScImageDescription description,
uint32_t  width 
)

Set width of image.

Parameters
descriptionthe description object. Must not be null
widthwidth in pixels
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerDemo.c.
uint32_t sc_image_description_get_height ( const ScImageDescription description)

Get height of image.

Parameters
descriptionthe description object. Must not be null
Returns
The height of the image in pixels.
Since
4.6.0
void sc_image_description_set_height ( ScImageDescription description,
uint32_t  height 
)

Set height of image.

Parameters
descriptionthe description object. Must not be null
heightheight in pixels
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerDemo.c.
uint32_t sc_image_description_get_first_plane_offset ( const ScImageDescription description)

Get start offset of the first data plane.

Parameters
descriptionthe description object. Must not be null.
Returns
The start offset of the first data plane.
Since
4.6.0
void sc_image_description_set_first_plane_offset ( ScImageDescription description,
uint32_t  offset 
)

Set the start offset of the first data plane.

Parameters
descriptionThe description object. Must not be null.
offsetThe offset as measured from the beginning of the data buffer.
Since
4.6.0
uint32_t sc_image_description_get_first_plane_row_bytes ( const ScImageDescription description)

Get the number of bytes per row for the first data plane.

Parameters
descriptionthe description object. Must not be null
Returns
The number of bytes per row.
Since
4.6.0
void sc_image_description_set_first_plane_row_bytes ( ScImageDescription description,
uint32_t  row_bytes 
)

Set the number of bytes per row for first data plane.

Parameters
descriptionThe description object. Must not be null.
row_bytesThe number of bytes.
Since
4.6.0
uint32_t sc_image_description_get_second_plane_row_bytes ( const ScImageDescription description)

Get the number of bytes per row for the second data plane.

Parameters
descriptionthe description object. Must not be null
Returns
The number of bytes per row of the second plane
Since
4.6.0
void sc_image_description_set_second_plane_row_bytes ( ScImageDescription description,
uint32_t  row_bytes 
)

Set the number of bytes per row for the second data plane.

Parameters
descriptionThe description object. Must not be null.
row_bytesthe number of bytes per row.
Since
4.6.0
uint32_t sc_image_description_get_second_plane_offset ( const ScImageDescription description)

Get the start offset of the second data plane.

Parameters
descriptionThe description object. Must not be null.
Returns
The start offset of the second data plane.
Since
4.6.0
void sc_image_description_set_second_plane_offset ( ScImageDescription description,
uint32_t  offset 
)

Set the start offset of the second data plane.

Parameters
descriptionThe description object. Must not be null.
offsetThe number of bytes per row.
Since
4.6.0
uint32_t sc_image_description_get_memory_size ( const ScImageDescription description)

Get the total memory size of the frame data.

Parameters
descriptionthe description object. Must not be null
Returns
The total size of the image buffer in bytes.
Since
4.6.0
void sc_image_description_set_memory_size ( ScImageDescription description,
uint32_t  memory_size 
)

Set the total memory size of the frame data.

Parameters
descriptionThe description object. Must not be null.
memory_sizeThe total memory size of the frame data.
Since
4.6.0
Examples:
ScanditNativeBarcodeScannerDemo.c.

The documentation for this struct was generated from the following file: