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
Member Function Documentation
ScImageDescription * sc_image_description_new | ( | void | ) |
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
void sc_image_description_retain | ( | ScImageDescription * | description | ) |
Increase reference count of image description by one.
- Parameters
-
description The 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
-
description the description object. May be null.
- Since
- 4.6.0
ScImageLayout sc_image_description_get_layout | ( | ScImageDescription const * | 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
-
description the 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
-
description the description object. Must not be null layout the new image layout
- See also
- sc_image_description_get_layout
- Since
- 4.6.0
uint32_t sc_image_description_get_width | ( | ScImageDescription const * | description | ) |
Get width of image.
- Parameters
-
description the 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
-
description the description object. Must not be null width width in pixels
- Since
- 4.6.0
uint32_t sc_image_description_get_height | ( | ScImageDescription const * | description | ) |
Get height of image.
- Parameters
-
description the 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
-
description the description object. Must not be null height height in pixels
- Since
- 4.6.0
uint32_t sc_image_description_get_first_plane_offset | ( | ScImageDescription const * | description | ) |
Get start offset of the first data plane.
- Parameters
-
description the 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
-
description The description object. Must not be null. offset The offset as measured from the beginning of the data buffer.
- Since
- 4.6.0
uint32_t sc_image_description_get_first_plane_row_bytes | ( | ScImageDescription const * | description | ) |
Get the number of bytes per row for the first data plane.
- Parameters
-
description the 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
-
description The description object. Must not be null. row_bytes The number of bytes.
- Since
- 4.6.0
uint32_t sc_image_description_get_second_plane_row_bytes | ( | ScImageDescription const * | description | ) |
Get the number of bytes per row for the second data plane.
- Parameters
-
description the 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
-
description The description object. Must not be null. row_bytes the number of bytes per row.
- Since
- 4.6.0
uint32_t sc_image_description_get_second_plane_offset | ( | ScImageDescription const * | description | ) |
Get the start offset of the second data plane.
- Parameters
-
description The 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
-
description The description object. Must not be null. offset The number of bytes per row.
- Since
- 4.6.0
uint32_t sc_image_description_get_memory_size | ( | ScImageDescription const * | description | ) |
Get the total memory size of the frame data.
- Parameters
-
description the 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
-
description The description object. Must not be null. memory_size The total memory size of the frame data.
- Since
- 4.6.0
The documentation for this struct was generated from the following file: