Go to the documentation of this file.
1 
10 #ifndef SC_IMAGE_DESCRIPTION_H_
11 #define SC_IMAGE_DESCRIPTION_H_
12 
13 #include <stddef.h>
14 
15 #include <Scandit/ScConfig.h>
16 
18 
24 typedef enum {
50 
58 
68 
78 
89 
100 
120 
130 } ScImageLayout;
131 
156 typedef struct ScOpaqueImageDescription ScImageDescription;
159 
171 SC_EXPORT
173 
182 SC_EXPORT
184 
195 SC_EXPORT
197 
214 SC_EXPORT
216 
228 SC_EXPORT
230 
241 SC_EXPORT
242 uint32_t sc_image_description_get_width(ScImageDescription const *description);
243 
254 SC_EXPORT
255 void sc_image_description_set_width(ScImageDescription *description, uint32_t width);
256 
267 SC_EXPORT
268 uint32_t sc_image_description_get_height(ScImageDescription const *description);
269 
279 SC_EXPORT
280 void sc_image_description_set_height(ScImageDescription *description, uint32_t height);
281 
292 SC_EXPORT
293 uint32_t sc_image_description_get_planes_count(ScImageDescription const *description);
294 
307 SC_EXPORT
308 ptrdiff_t sc_image_description_get_plane_offset(ScImageDescription const *description,
309  uint32_t plane_index);
310 
321 SC_EXPORT
323  uint32_t plane_index,
324  ptrdiff_t offset);
325 
337 SC_EXPORT
339  uint32_t plane_index);
340 
351 SC_EXPORT
353  uint32_t plane_index,
354  uint32_t row_bytes);
355 
357 
358 #endif // SC_IMAGE_DESCRIPTION_H_
Image layout is unknown.
Definition: ScImageDescription.h:28
void sc_image_description_set_height(ScImageDescription *description, uint32_t height)
Set height of image.
ptrdiff_t sc_image_description_get_plane_offset(ScImageDescription const *description, uint32_t plane_index)
Get an offset of the first pixel value of the selected data plane relative to the start of the corres...
uint32_t sc_image_description_get_width(ScImageDescription const *description)
Get width of image.
void sc_image_description_set_width(ScImageDescription *description, uint32_t width)
Set width of image.
RGB image with 8 bits per color channel.
Definition: ScImageDescription.h:42
uint32_t sc_image_description_get_planes_count(ScImageDescription const *description)
Get a number of non-interleaved image data planes according to the image layout. Image data planes ei...
uint32_t sc_image_description_get_height(ScImageDescription const *description)
Get height of image.
8-bit UYVY 4:2:2 image format.
Definition: ScImageDescription.h:99
RGBA image with 8 bits per color channel.
Definition: ScImageDescription.h:49
BGR image with 8 bits per color channel.
Definition: ScImageDescription.h:119
void sc_image_description_set_plane_offset(ScImageDescription *description, uint32_t plane_index, ptrdiff_t offset)
Set the start offset of the selected data plane relative to the image buffer start.
ScImageDescription * sc_image_description_new(void)
Create a new image description.
#define SC_EXTERN_C_BEGIN
Start of external C code.
Definition: ScConfig.h:19
ARGB image with 8 bits per color channel.
Definition: ScImageDescription.h:57
Single-channel 8-bit gray scale image.
Definition: ScImageDescription.h:35
ScImageLayout
Specifies the format of the pixel data.
Definition: ScImageDescription.h:24
Describes dimensions as well as internal memory layout of an image buffer.
uint32_t sc_image_description_get_plane_row_bytes(ScImageDescription const *description, uint32_t plane_index)
Get the number of bytes per row for the selected data plane.
void sc_image_description_set_plane_row_bytes(ScImageDescription *description, uint32_t plane_index, uint32_t row_bytes)
Set the number of bytes per row for selected data plane.
#define SC_EXTERN_C_END
End of external C code.
Definition: ScConfig.h:28
YpCbCr 4:2:0 image format.
Definition: ScImageDescription.h:67
Common definitions used throughout the ScanditSDK API.
YpCrCb 4:2:2 image format.
Definition: ScImageDescription.h:129
YpCrCb 4:2:0 image format.
Definition: ScImageDescription.h:77
void sc_image_description_retain(ScImageDescription *description)
Increase reference count of image description by one.
I420 format with separate Y, U and V planes.
Definition: ScImageDescription.h:110
void sc_image_description_release(ScImageDescription *description)
Decrease reference count of image description by one.
8-bit YUYV 4:2:2 image format.
Definition: ScImageDescription.h:88
void sc_image_description_set_layout(ScImageDescription *description, ScImageLayout layout)
Set the image layout.
ScImageLayout sc_image_description_get_layout(ScImageDescription const *description)
Get the image layout.