![]() |
Oyranos Colour Management System API |
|
Data Structures | |
| struct | oyArray2d_s |
| 2d data array More... | |
| struct | oyImage_s |
| a reference struct to gather information for image transformation 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 data_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 | |
| int | oyArray2d_s::oyArray2d_ReleaseArray (oyArray2d_s *obj) |
| release Array2d::array member | |
| OYAPI int OYEXPORT | oyArray2d_s::oyArray2d_Release (oyArray2d_s **obj) |
| release and possibly deallocate 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 | |
| int | oyImage_s::oyImage_SetArray2dPointContinous (oyImage_s *image, int point_x, int point_y, int channel, oyPointer data) |
| standard continous layout pixel accessor | |
| int | oyImage_s::oyImage_SetArray2dLineContinous (oyImage_s *image, int point_x, int point_y, int pixel_n, int channel, oyPointer data) |
| 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, int display_width, int display_height, 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, oyImage_SetPoint_f setPoint, oyImage_SetLine_f setLine, oyImage_SetTile_f setTile) |
| set a custom image data module | |
| int | oyArray2d_s::oyArray2d_SetFocus (oyArray2d_s *array, oyRectangle_s *rectangle) |
| move a arrays active area to a given rectangle | |
| int | oyImage_s::oyImage_FillArray (oyImage_s *image, oyRectangle_s *rectangle, int allocate_method, oyArray2d_s **array, oyRectangle_s *array_rectangle, oyObject_s obj) |
| creata a array from a image and fill with data | |
| int | oyImage_s::oyImage_ReadArray (oyImage_s *image, oyRectangle_s *image_rectangle, oyArray2d_s *array, oyRectangle_s *array_rectangle) |
| read a array into a image | |
| oyPixel_t | oyImage_s::oyImage_PixelLayoutGet (oyImage_s *image) |
| get the pixel layout | |
| oyProfile_s * | oyImage_s::oyImage_ProfileGet (oyImage_s *image) |
| get the image profile | |
| oyOptions_s * | oyImage_s::oyImage_TagsGet (oyImage_s *image) |
| get object tags | |
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 | ||
| ) |
copy or reference a Array2d object
Function oyArray2d_Copy
| [in] | obj | struct object |
| object | the optional object |
Referenced by oyArray2d_s::oyArray2d_New().
| OYAPI oyArray2d_s *OYEXPORT oyArray2d_Create | ( | oyPointer | data, |
| int | width, | ||
| int | height, | ||
| oyDATATYPE_e | data_type, | ||
| oyObject_s | object | ||
| ) |
allocate and initialise a oyArray2d_s object
Function oyArray2d_Create
References oyArray2d_s::own_lines, oySizeofDatatype(), and oyYES.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| OYAPI oyArray2d_s *OYEXPORT oyArray2d_New | ( | oyObject_s | object | ) |
allocate a new Array2d object
Function oyArray2d_New
References oyArray2d_s::oyArray2d_Copy(), oyArray2d_s::oyArray2d_Release(), and oyArray2d_s::release.
| OYAPI int OYEXPORT oyArray2d_Release | ( | oyArray2d_s ** | obj | ) |
release and possibly deallocate a Array2d object
Function oyArray2d_Release
| [in,out] | obj | struct object |
References oyArray2d_s::oyArray2d_ReleaseArray().
Referenced by oyArray2d_s::oyArray2d_New(), and oyImage_s::oyImage_FillArray().
| int oyArray2d_ReleaseArray | ( | oyArray2d_s * | obj | ) |
release Array2d::array member
Function oyArray2d_ReleaseArray
| [in,out] | obj | struct object |
References oyArray2d_s::data_area, oyRectangle_s::oyRectangle_Show(), oySizeofDatatype(), and oyArray2d_s::t.
Referenced by oyArray2d_s::oyArray2d_Release().
| int oyArray2d_SetFocus | ( | oyArray2d_s * | array, |
| oyRectangle_s * | rectangle | ||
| ) |
move a arrays active area to a given rectangle
Function oyArray2d_SetFocus
| [in,out] | array | the pixel array |
| [in] | rectangle | the new region in the array's wholes data |
References oyArray2d_s::array2d, oyArray2d_s::data_area, oyArray2d_s::height, oySizeofDatatype(), oyArray2d_s::t, and oyArray2d_s::width.
Referenced by oyImage_s::oyImage_FillArray().
copy a image
Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage(), 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 | ||
| ) |
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(), oyImage_s::oyImage_SetArray2dLineContinous(), oyImage_s::oyImage_SetArray2dPointContinous(), oyProfile_s::oyProfile_Copy(), oyRectangle_s::oyRectangle_NewWith(), and oyImage_s::release.
Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage(), and 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, | ||
| int | display_width, | ||
| int | display_height, | ||
| oyObject_s | object | ||
| ) |
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] | display_width | width to show in window |
| [in] | display_height | height to show in window |
| [in] | object | the optional base |
References oyImage_s::oyImage_Create(), oyImage_s::oyImage_Release(), oyProfile_s::oyProfile_FromFile(), oyProfile_s::oyProfile_Release(), oyRectangle_s::oyRectangle_SetGeo(), and oyImage_s::tags.
| int oyImage_DataSet | ( | oyImage_s * | image, |
| oyStruct_s ** | pixel_data, | ||
| oyImage_GetPoint_f | getPoint, | ||
| oyImage_GetLine_f | getLine, | ||
| oyImage_GetTile_f | getTile, | ||
| oyImage_SetPoint_f | setPoint, | ||
| oyImage_SetLine_f | setLine, | ||
| oyImage_SetTile_f | setTile | ||
| ) |
set a custom image data module
Function oyImage_SetData
This function allowes for exchanging of all the module 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 |
| setPoint | interface function |
| setLine | interface function |
| setTile | interface function |
References oyImage_s::getLine, oyImage_s::getPoint, oyImage_s::getTile, oyImage_s::pixel_data, oyImage_s::setLine, oyImage_s::setPoint, and oyImage_s::setTile.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| int oyImage_FillArray | ( | oyImage_s * | image, |
| oyRectangle_s * | rectangle, | ||
| int | allocate_method, | ||
| oyArray2d_s ** | array, | ||
| oyRectangle_s * | array_rectangle, | ||
| oyObject_s | obj | ||
| ) |
creata a array from a image and fill with data
Function oyImage_FillArray
The rectangle will be considered relative to the data. A given array will be filled. Allocation of a new array2d object happens as needed.
| [in] | image | the image |
| [in] | rectangle | the image rectangle in a relative unit a rectangle in the source image |
| [in] | allocate_method |
|
| [out] | array | array to fill; If array is empty, it is allocated as per allocate_method |
| [in] | array_rectangle | the array rectangle in samples For NULL the image rectangle will be placed to the top left corner in array. If array_rectangle is provided, image samples will be placed in array at array_rectangle's position and size. The unit is relative to the image. |
| [in] | obj | the optional user object |
References oyArray2d_s::array2d, oyArray2d_s::data_area, oyImage_s::getLine, oyImage_s::getPoint, oyImage_s::getTile, oyArray2d_s::height, oyArray2d_s::own_lines, oyArray2d_s::oyArray2d_Release(), oyArray2d_s::oyArray2d_SetFocus(), oyRectangle_s::oyRectangle_SamplesFromImage(), oyRectangle_s::oyRectangle_SetGeo(), oySizeofDatatype(), oyUINT8, oyArray2d_s::width, and oyImage_s::width.
| oyPointer oyImage_GetArray2dLineContinous | ( | oyImage_s * | image, |
| int | point_y, | ||
| int * | height, | ||
| int | channel, | ||
| int * | is_allocated | ||
| ) |
standard continous layout line accessor
Function oyImage_GetLineContinous
References oyArray2d_s::array2d, oyArray2d_s::height, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| oyPointer oyImage_GetArray2dLinePlanar | ( | oyImage_s * | image, |
| int | point_y, | ||
| int * | height, | ||
| int | channel, | ||
| int * | is_allocated | ||
| ) |
standard continus layout line accessor
Function oyImage_GetLinePlanar
We assume a channel after channel behaviour without line interweaving.
References oyArray2d_s::array2d, 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 | ||
| ) |
standard continous layout pixel accessor
Function oyImage_GetPointContinous
References oyArray2d_s::array2d, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| oyPointer oyImage_GetArray2dPointPlanar | ( | oyImage_s * | image, |
| int | point_x, | ||
| int | point_y, | ||
| int | channel, | ||
| int * | is_allocated | ||
| ) |
standard planar layout pixel accessor
Function oyImage_GetPointPlanar
References oyArray2d_s::array2d, and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create().
get the pixel layout
Function oyImage_PixelLayoutGet
| oyProfile_s * oyImage_ProfileGet | ( | oyImage_s * | image | ) |
get the image profile
Function oyImage_ProfileGet
References oyProfile_s::oyProfile_Copy().
| int oyImage_ReadArray | ( | oyImage_s * | image, |
| oyRectangle_s * | image_rectangle, | ||
| oyArray2d_s * | array, | ||
| oyRectangle_s * | array_rectangle | ||
| ) |
read a array into a image
Function oyImage_ReadArray
The rectangle will be considered relative to the image. The given array should match that rectangle.
References oyArray2d_s::array2d, oyArray2d_s::data_area, oyArray2d_s::height, oyRectangle_s::oyRectangle_SamplesFromImage(), oyRectangle_s::oyRectangle_Scale(), oyRectangle_s::oyRectangle_SetByRectangle(), oyRectangle_s::oyRectangle_SetGeo(), oyRectangle_s::oyRectangle_Show(), oySizeofDatatype(), oyUINT8, oyImage_s::setLine, oyArray2d_s::width, and oyImage_s::width.
| int oyImage_Release | ( | oyImage_s ** | obj | ) |
release a image
References oyImage_s::channel_layout, oyImage_s::height, oyProfile_s::oyProfile_Release(), oyImage_s::pixel_data, oyImage_s::user_data, and oyImage_s::width.
Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage(), oyImage_s::oyImage_Create(), and oyImage_s::oyImage_CreateForDisplay().
| int oyImage_SetArray2dLineContinous | ( | oyImage_s * | image, |
| int | point_x, | ||
| int | point_y, | ||
| int | pixel_n, | ||
| int | channel, | ||
| oyPointer | data | ||
| ) |
standard continous layout line accessor
Function oyImage_SetLineContinous
References oyArray2d_s::array2d, oySizeofDatatype(), oyImage_s::pixel_data, and oyImage_s::width.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| int oyImage_SetArray2dPointContinous | ( | oyImage_s * | image, |
| int | point_x, | ||
| int | point_y, | ||
| int | channel, | ||
| oyPointer | data | ||
| ) |
standard continous layout pixel accessor
Function oyImage_SetPointContinous
References oyArray2d_s::array2d, oySizeofDatatype(), and oyImage_s::pixel_data.
Referenced by oyImage_s::oyImage_Create(), and oyImage_s::oyImage_SetCritical().
| int oyImage_SetCritical | ( | oyImage_s * | image, |
| oyPixel_t | pixel_layout, | ||
| oyProfile_s * | profile, | ||
| oyOptions_s * | options | ||
| ) |
set a image
set critical options
References oyImage_s::getLine, oyImage_s::getPoint, oyImage_s::height, oyArray2d_s::oyArray2d_Create(), oyImage_s::oyImage_DataSet(), oyImage_s::oyImage_GetArray2dLineContinous(), oyImage_s::oyImage_GetArray2dPointContinous(), oyImage_s::oyImage_SetArray2dLineContinous(), oyImage_s::oyImage_SetArray2dPointContinous(), oyProfile_s::oyProfile_Copy(), oyProfile_s::oyProfile_Release(), oyImage_s::setLine, oyImage_s::setPoint, oyImage_s::tags, and oyImage_s::width.
| oyOptions_s * oyImage_TagsGet | ( | oyImage_s * | image | ) |
get object tags
Function oyImage_TagsGet
References oyImage_s::tags.