Oyranos Colour Management System API
Data Structures | Typedefs | Enumerations | Functions
Image API
Alpha API's
Collaboration diagram for Image 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_soyImage_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_soyImage_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_soyImage_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_soyImage_s::oyImage_ProfileGet (oyImage_s *image)
 get the image profile
oyOptions_s * oyImage_s::oyImage_TagsGet (oyImage_s *image)
 get object tags

Typedef Documentation

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)


Enumeration Type Documentation

channels types

Version:
Oyranos: 0.1.10
Since:
2008/00/00 (Oyranos: 0.1.8)
Date:
2009/08/03
Enumerator:
oyCHANNELTYPE_UNDEFINED 

as well for the list end

basic data types for anonymous pointers

Version:
Oyranos: 0.1.8
Since:
2007/00/00 (Oyranos: 0.1.8)
Date:
2007/00/00
Enumerator:
oyUINT8 

8-bit integer

oyUINT16 

16-bit integer

oyUINT32 

32-bit integer

oyHALF 

16-bit floating point number

oyFLOAT 

IEEE floating point number

oyDOUBLE 

IEEE double precission floating point number


Function Documentation

OYAPI oyArray2d_s *OYEXPORT oyArray2d_Copy ( oyArray2d_s obj,
oyObject_s  object 
)

copy or reference a Array2d object

Function oyArray2d_Copy

Parameters:
[in]objstruct object
objectthe optional object
Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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

Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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

Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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

Parameters:
[in,out]objstruct object
Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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

Parameters:
[in,out]objstruct object
Version:
Oyranos: 0.1.11
Since:
2010/09/07 (Oyranos: 0.1.11)
Date:
2010/09/07

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

Parameters:
[in,out]arraythe pixel array
[in]rectanglethe new region in the array's wholes data
Returns:
error
Version:
Oyranos: 0.3.0
Since:
2011/04/19 (Oyranos: 0.3.0)
Date:
2011/04/19

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().

oyImage_s * oyImage_Copy ( oyImage_s image,
oyObject_s  object 
)

copy a image

Since:
Oyranos: version 0.1.8
Date:
october 2007 (API 0.1.8)

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.

Parameters:
[in]widthimage width
[in]heightimage height
[in]channelspointer to the data buffer
[in]pixel_layouti.e. oyTYPE_123_16 for 16-bit RGB data
[in]profilecolour space description
[in]objectthe optional base
Version:
Oyranos: 0.1.8
Since:
2007/11/00 (Oyranos: 0.1.8)
Date:
2008/08/23

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

Parameters:
[in]widthimage width
[in]heightimage height
[in]channelspointer to the data buffer
[in]pixel_layouti.e. oyTYPE_123_16 for 16-bit RGB data
[in]display_namedisplay name
[in]display_pos_xleft image position on display
[in]display_pos_ytop image position on display
[in]display_widthwidth to show in window
[in]display_heightheight to show in window
[in]objectthe optional base
Since:
Oyranos: version 0.1.8
Date:
october 2007 (API 0.1.8)

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.

Parameters:
imagethe image
pixel_datadata struct will be moved in
getPointinterface function
getLineinterface function
getTileinterface function
setPointinterface function
setLineinterface function
setTileinterface function
Returns:
error
Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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.

Parameters:
[in]imagethe image
[in]rectanglethe image rectangle in a relative unit a rectangle in the source image
[in]allocate_method
  • 0 assign the rows without copy
  • 1 do copy into the array
  • 2 allocate empty rows
[out]arrayarray to fill; If array is empty, it is allocated as per allocate_method
[in]array_rectanglethe 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]objthe optional user object
Version:
Oyranos: 0.3.0
Since:
2008/10/02 (Oyranos: 0.1.8)
Date:
2011/05/02

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

Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/23

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.

Version:
Oyranos: 0.1.8
Since:
2008/08/23 (Oyranos: 0.1.8)
Date:
2008/08/24

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

Version:
Oyranos: 0.1.8
Since:
2008/06/26 (Oyranos: 0.1.8)
Date:
2008/06/26

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

Version:
Oyranos: 0.1.8
Since:
2008/06/26 (Oyranos: 0.1.8)
Date:
2008/08/24

References oyArray2d_s::array2d, and oyImage_s::pixel_data.

Referenced by oyImage_s::oyImage_Create().

oyPixel_t oyImage_PixelLayoutGet ( oyImage_s image)

get the pixel layout

Function oyImage_PixelLayoutGet

Version:
Oyranos: 0.1.10
Since:
2009/03/05 (Oyranos: 0.1.10)
Date:
2009/03/05
oyProfile_s * oyImage_ProfileGet ( oyImage_s image)

get the image profile

Function oyImage_ProfileGet

Version:
Oyranos: 0.1.10
Since:
2009/08/05 (Oyranos: 0.1.10)
Date:
2009/08/05

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.

Version:
Oyranos: 0.1.10
Since:
2009/02/28 (Oyranos: 0.1.10)
Date:
2009/02/28

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)
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

Version:
Oyranos: 0.1.10
Since:
2009/02/22 (Oyranos: 0.1.10)
Date:
2009/02/22

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

Version:
Oyranos: 0.1.10
Since:
2009/02/22 (Oyranos: 0.1.10)
Date:
2009/02/22

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 
)
oyOptions_s * oyImage_TagsGet ( oyImage_s image)

get object tags

Function oyImage_TagsGet

Version:
Oyranos: 0.1.10
Since:
2009/03/05 (Oyranos: 0.1.10)
Date:
2009/03/05

References oyImage_s::tags.