![]() |
Data Structures | |
struct | oyImage_s |
a reference struct to gather information for image transformation
as we dont target a complete imaging solution, only raster is supported More... | |
struct | oyArray2d_s |
2d data array
oyArray2d_s is a in memory data view. The array2d holds pointers to lines in the original memory blob. The arrays contained in array2d represent the samples. There is no information in which order the samples appear. No pixel layout or meaning is provided. Given the coordinates x and y, a samples memory adress can be accessed by &array2d[y][x] . This adress must be converted to the data type provided in oyArray2d_s::t. More... | |
Typedefs | |
typedef uint32_t | oyPixel_t |
Enumerations | |
enum | oyDATATYPE_e { oyUINT8, oyUINT16, oyUINT32, oyHALF, oyFLOAT, oyDOUBLE } |
basic data types for anonymous pointers More... | |
enum | oyCHANNELTYPE_e { oyCHANNELTYPE_UNDEFINED } |
channels types More... | |
Functions | |
OYAPI oyArray2d_s *OYEXPORT | oyArray2d_s::oyArray2d_New (oyObject_s object) |
allocate a new Array2d object | |
OYAPI oyArray2d_s *OYEXPORT | oyArray2d_s::oyArray2d_Create (oyPointer data, int width, int height, oyDATATYPE_e type, oyObject_s object) |
allocate and initialise a oyArray2d_s object | |
OYAPI oyArray2d_s *OYEXPORT | oyArray2d_s::oyArray2d_Copy (oyArray2d_s *obj, oyObject_s object) |
copy or reference a Array2d object | |
oyPointer | oyImage_s::oyImage_GetArray2dPointContinous (oyImage_s *image, int point_x, int point_y, int channel, int *is_allocated) |
standard continous layout pixel accessor | |
oyPointer | oyImage_s::oyImage_GetArray2dLineContinous (oyImage_s *image, int point_y, int *height, int channel, int *is_allocated) |
standard continous layout line accessor | |
oyPointer | oyImage_s::oyImage_GetArray2dPointPlanar (oyImage_s *image, int point_x, int point_y, int channel, int *is_allocated) |
standard planar layout pixel accessor | |
oyPointer | oyImage_s::oyImage_GetArray2dLinePlanar (oyImage_s *image, int point_y, int *height, int channel, int *is_allocated) |
standard continus layout line accessor | |
oyImage_s * | oyImage_s::oyImage_Create (int width, int height, oyPointer channels, oyPixel_t pixel_layout, oyProfile_s *profile, oyObject_s object) |
collect infos about a image | |
oyImage_s * | oyImage_s::oyImage_CreateForDisplay (int width, int height, oyPointer channels, oyPixel_t pixel_layout, const char *display_name, int display_pos_x, int display_pos_y, oyObject_s object) |
collect infos about a image for showing one a display | |
oyImage_s * | oyImage_s::oyImage_Copy (oyImage_s *image, oyObject_s object) |
copy a image | |
int | oyImage_s::oyImage_Release (oyImage_s **obj) |
release a image | |
int | oyImage_s::oyImage_SetCritical (oyImage_s *image, oyPixel_t pixel_layout, oyProfile_s *profile, oyOptions_s *options) |
set a image | |
int | oyImage_s::oyImage_DataSet (oyImage_s *image, oyStruct_s **pixel_data, oyImage_GetPoint_f getPoint, oyImage_GetLine_f getLine, oyImage_GetTile_f getTile) |
set a custom image data backend | |
int | oyImage_s::oyImage_FillArray (oyImage_s *image, oyRegion_s *region, int do_copy, oyArray2d_s **array, oyObject_s obj) |
creata a array from a image and fill with data |
parametric type as shorthand for the channel layout in bitmaps
should fit into a 32bit type, usual unsigned int or uint32_t
X F P S TTTT OOOOOOOO CCCCCCCC
C channels count per pixel (3 for RGB); max 255
O colour channel offset (0 for RGB, 1 for ARGB)
P Planar bit: 0 - interwoven, 1 - one channel after the other
S Swap colour channels bit (BGR)
T Type oyDATATYPE_e
X non host byte order bit
F Revert bit: 0 - MinIsBlack(Chocolate) 1 - MinIsWhite(Vanilla);
exchange min and max : (1-x)
enum oyCHANNELTYPE_e |
enum oyDATATYPE_e |
basic data types for anonymous pointers
OYAPI oyArray2d_s *OYEXPORT oyArray2d_Copy | ( | oyArray2d_s * | obj, | |
oyObject_s | object | |||
) | [related, inherited] |
copy or reference a Array2d object
Function oyArray2d_Copy
[in] | obj | struct object |
object | the optional object |
References oyArray2d_s::oy_, oyOBJECT_ARRAY2D_S, oyObject_s::oyObject_Copy(), and oyArray2d_s::type_.
Referenced by oyArray2d_s::oyArray2d_New().
OYAPI oyArray2d_s *OYEXPORT oyArray2d_Create | ( | oyPointer | data, | |
int | width, | |||
int | height, | |||
oyDATATYPE_e | type, | |||
oyObject_s | object | |||
) | [related, inherited] |
allocate and initialise a oyArray2d_s object
Function oyArray2d_Create
Referenced by oyImage_s::oyImage_Create().
OYAPI oyArray2d_s *OYEXPORT oyArray2d_New | ( | oyObject_s | object | ) | [related, inherited] |
allocate a new Array2d object
Function oyArray2d_New
References oyArray2d_s::oyArray2d_Copy(), oyOBJECT_ARRAY2D_S, oyObject_s::oyObject_NewFrom(), oyObject_s::oyObject_SetParent(), and oyArray2d_s::release.
oyImage_s * oyImage_Copy | ( | oyImage_s * | image, | |
oyObject_s | object | |||
) | [related, inherited] |
copy a image
References oyImage_s::oy_, oyObject_s::oyObject_Copy(), oyOBJECT_IMAGE_S, and oyImage_s::type_.
Referenced by oyConversion_s::oyConversion_CreateInput(), oyConversion_s::oyConversion_OutputAdd(), oyFilterNode_s::oyFilterNode_ConnectorMatch(), and oyImage_s::oyImage_Create().
oyImage_s * oyImage_Create | ( | int | width, | |
int | height, | |||
oyPointer | channels, | |||
oyPixel_t | pixel_layout, | |||
oyProfile_s * | profile, | |||
oyObject_s | object | |||
) | [related, inherited] |
collect infos about a image
Create a image description and access object. The passed channels pointer remains in the responsibility of the user. The image is a in memory blob.
[in] | width | image width |
[in] | height | image height |
[in] | channels | pointer to the data buffer |
[in] | pixel_layout | i.e. oyTYPE_123_16 for 16-bit RGB data |
[in] | profile | colour space description |
[in] | object | the optional base |
References oyArray2d_s::oyArray2d_Create(), oyImage_s::oyImage_Copy(), oyImage_s::oyImage_DataSet(), oyImage_s::oyImage_GetArray2dLineContinous(), oyImage_s::oyImage_GetArray2dLinePlanar(), oyImage_s::oyImage_GetArray2dPointContinous(), oyImage_s::oyImage_GetArray2dPointPlanar(), oyImage_s::oyImage_Release(), oyOBJECT_IMAGE_S, oyObject_s::oyObject_NewFrom(), oyObject_s::oyObject_SetParent(), oyProfile_s::oyProfile_Copy(), oyRegion_s::oyRegion_NewWith(), and oyImage_s::release.
Referenced by oyImage_s::oyImage_CreateForDisplay().
oyImage_s * oyImage_CreateForDisplay | ( | int | width, | |
int | height, | |||
oyPointer | channels, | |||
oyPixel_t | pixel_layout, | |||
const char * | display_name, | |||
int | display_pos_x, | |||
int | display_pos_y, | |||
oyObject_s | object | |||
) | [related, inherited] |
collect infos about a image for showing one a display
[in] | width | image width |
[in] | height | image height |
[in] | channels | pointer to the data buffer |
[in] | pixel_layout | i.e. oyTYPE_123_16 for 16-bit RGB data |
[in] | display_name | display name |
[in] | display_pos_x | left image position on display |
[in] | display_pos_y | top image position on display |
[in] | object | the optional base |
References oyImage_s::display_pos_x, oyImage_s::display_pos_y, oyImage_s::oyImage_Create(), oyProfile_s::oyProfile_FromFile(), oyProfile_s::oyProfile_Release(), and oyImage_s::profile_.
int oyImage_DataSet | ( | oyImage_s * | image, | |
oyStruct_s ** | pixel_data, | |||
oyImage_GetPoint_f | getPoint, | |||
oyImage_GetLine_f | getLine, | |||
oyImage_GetTile_f | getTile | |||
) | [related, inherited] |
set a custom image data backend
Function oyImage_SetData
This function allowes for exchanging of all the backend components.
The pixel_data structure can hold in memory or mmap representations or file pointers. The according point, line and/or tile functions shall use the oyImage_s::pixel_data member to access the data and provide in this interface.
image | the image | |
pixel_data | data struct will be moved in | |
getPoint | interface function | |
getLine | interface function | |
getTile | interface function |
References oyImage_s::getLine, oyImage_s::getPoint, oyImage_s::getTile, oyOBJECT_IMAGE_S, oyImage_s::pixel_data, oyStruct_s::release, and oyImage_s::type_.
Referenced by oyImage_s::oyImage_Create().
int oyImage_FillArray | ( | oyImage_s * | image, | |
oyRegion_s * | region, | |||
int | do_copy, | |||
oyArray2d_s ** | array, | |||
oyObject_s | obj | |||
) | [related, inherited] |
creata a array from a image and fill with data
Function oyImage_FillArray
The region will be considered relative to the data. A given array will be filled. do_copy makes the distinction to reuse a available array2d. If do_copy is set to false, a owned array is freed and newly allocated or a the new array is set according to the get* API in oyImage_s. A empty array will be completely allocated. Pixel layouts should be normalised within this function. So it works like a mediator.
References oyArray2d_s::array2d, oyArray2d_s::data_area, oyImage_s::getLine, oyImage_s::getPoint, oyImage_s::getTile, oyImage_s::height, oyImage_s::layout_, oyArray2d_s::oy_, oyOBJECT_IMAGE_S, oyRegion_s::oyRegion_NewFrom(), oyRegion_s::oyRegion_Scale(), oySizeofDatatype(), oyUINT8, oyImage_s::type_, oyArray2d_s::width, and oyImage_s::width.
Referenced by oyConversion_s::oyConversion_Run().
oyPointer oyImage_GetArray2dLineContinous | ( | oyImage_s * | image, | |
int | point_y, | |||
int * | height, | |||
int | channel, | |||
int * | is_allocated | |||
) | [related, inherited] |
standard continous layout line accessor
Function oyImage_GetLineContinous
References oyArray2d_s::array2d, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create().
oyPointer oyImage_GetArray2dLinePlanar | ( | oyImage_s * | image, | |
int | point_y, | |||
int * | height, | |||
int | channel, | |||
int * | is_allocated | |||
) | [related, inherited] |
standard continus layout line accessor
Function oyImage_GetLinePlanar
We assume a channel after channel behaviour without line interweaving.
References oyArray2d_s::array2d, oyImage_s::layout_, oyImage_s::pixel_data, and oyImage_s::width.
Referenced by oyImage_s::oyImage_Create().
oyPointer oyImage_GetArray2dPointContinous | ( | oyImage_s * | image, | |
int | point_x, | |||
int | point_y, | |||
int | channel, | |||
int * | is_allocated | |||
) | [related, inherited] |
standard continous layout pixel accessor
Function oyImage_GetPointContinous
References oyArray2d_s::array2d, oyImage_s::layout_, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create().
oyPointer oyImage_GetArray2dPointPlanar | ( | oyImage_s * | image, | |
int | point_x, | |||
int | point_y, | |||
int | channel, | |||
int * | is_allocated | |||
) | [related, inherited] |
standard planar layout pixel accessor
Function oyImage_GetPointPlanar
References oyArray2d_s::array2d, oyImage_s::layout_, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create().
int oyImage_Release | ( | oyImage_s ** | obj | ) | [related, inherited] |
release a image
References oyImage_s::channel_layout, oyImage_s::height, oyImage_s::layout_, oyImage_s::oy_, oyOBJECT_IMAGE_S, oyObject_s::oyObject_Release(), oyProfile_s::oyProfile_Release(), oyImage_s::pixel_data, oyImage_s::profile_, oyStruct_s::release, oyImage_s::type_, oyImage_s::user_data, and oyImage_s::width.
Referenced by oyConversion_s::oyConversion_OutputAdd(), oyFilterNode_s::oyFilterNode_ConnectorMatch(), and oyImage_s::oyImage_Create().
int oyImage_SetCritical | ( | oyImage_s * | image, | |
oyPixel_t | pixel_layout, | |||
oyProfile_s * | profile, | |||
oyOptions_s * | options | |||
) | [related, inherited] |
set a image
set critical options
References oyImage_s::options_, oyImage_s::oy_, oyOptions_s::oyOptions_Copy(), oyProfile_s::oyProfile_Copy(), and oyImage_s::profile_.