| Oyranos Colour Management System API

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Enumerations | Enumerator | Functions
Image Container API

## Data Structures
struct | oyArray2d_s
| 2d data array More...
struct | oyImage_s
| A reference struct to gather information for image transformation. More...
struct | oyRectangle_s
| Start with a simple rectangle. More...

## Macros
#define | oyChannels_m(c) (c)
#define | oyColourOffset_m(o) ((o) << 8)
#define | oyDataType_m(t) ((t) << 16)
#define | oySwapColourChannels_m(s) ((s) << 20)
#define | oyPlanar_m(p) ((p) << 21)
#define | oyFlavor_m(p) ((f) << 22)
#define | oyByteSwap_m(x) ((x) << 23)
#define | OY_TYPE_123_8 (oyChannels_m(3)|oyDataType_m(oyUINT8))
#define | OY_TYPE_123_16 (oyChannels_m(3)|oyDataType_m(oyUINT16))
#define | OY_TYPE_123_HALF (oyChannels_m(3)|oyDataType_m(oyHALF))
#define | OY_TYPE_123_FLOAT (oyChannels_m(3)|oyDataType_m(oyFLOAT))
#define | OY_TYPE_123_DBL (oyChannels_m(3)|oyDataType_m(oyDOUBLE))
#define | OY_TYPE_123A_8 (oyChannels_m(4)|oyDataType_m(oyUINT8))
#define | OY_TYPE_123A_16 (oyChannels_m(4)|oyDataType_m(oyUINT16))
#define | OY_TYPE_123A_HALF (oyChannels_m(4)|oyDataType_m(oyHALF))
#define | OY_TYPE_123A_FLOAT (oyChannels_m(4)|oyDataType_m(oyFLOAT))
#define | OY_TYPE_123A_DBL (oyChannels_m(4)|oyDataType_m(oyDOUBLE))
#define | OY_TYPE_123AZ_HALF (oyChannels_m(5)|oyDataType_m(oyHALF))
#define | OY_TYPE_123AZ_FLOAT (oyChannels_m(5)|oyDataType_m(oyFLOAT))
#define | OY_TYPE_123AZ_DBL (oyChannels_m(5)|oyDataType_m(oyDOUBLE))
#define | OY_TYPE_1234_8 (oyChannels_m(4)|oyDataType_m(oyUINT8))
#define | OY_TYPE_1234A_8 (oyChannels_m(5)|oyDataType_m(oyUINT8))
#define | OY_TYPE_1_8 (oyChannels_m(1)|oyDataType_m(oyUINT8))
#define | OY_TYPE_1_16 (oyChannels_m(1)|oyDataType_m(oyUINT16))
#define | oyToChannels_m(c) ((c)&255)
#define | oyToColourOffset_m(o) (((o) >> 8)&255)
#define | oyToDataType_m(t) ((oyDATATYPE_e)(((t) >> 16)&15))
#define | oyToSwapColourChannels_m(s) (((s) >> 20)&1)
#define | oyToPlanar_m(p) (((p) >> 21)&1)
#define | oyToFlavor_m(f) (((f) >> 22)&1)
#define | oyToByteswap_m(x) (((x) >> 23)&1)

## 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, oyCHANNELTYPE_OTHER, oyCHANNELTYPE_LIGHTNESS, oyCHANNELTYPE_COLOUR, oyCHANNELTYPE_COLOUR_LIGHTNESS, oyCHANNELTYPE_COLOUR_LIGHTNESS_PREMULTIPLIED, oyCHANNELTYPE_DEPTH, oyCHANNELTYPE_ALPHA1, oyCHANNELTYPE_ALPHA2, oyCHANNELTYPE_ALPHA3, oyCHANNELTYPE_U, oyCHANNELTYPE_V }
| Channels types of Colours. More...
enum | oyPIXEL_ACCESS_TYPE_e { oyPIXEL_ACCESS_IMAGE, oyPIXEL_ACCESS_POINT, oyPIXEL_ACCESS_LINE }
| Pixel access types. More...
enum | oyLAYOUT_e { oyLAYOUT = 0, oyPOFF_X, oyPOFF_Y, oyCOFF, oyDATA_SIZE, oyCHANS, oyCHAN0 }
| Pixel mask descriptions. More...

## Functions
oyCHANNELTYPE_e | oyICCColourSpaceToChannelLayout (icColorSpaceSignature sig, int pos)
| describe a channels characteristic More...

## Detailed Description

## Macro Definition Documentation

#define OY_TYPE_1234_8 (oyChannels_m(4)|oyDataType_m(oyUINT8))

8-bit Cmyk

#define OY_TYPE_1234A_8 (oyChannels_m(5)|oyDataType_m(oyUINT8))

8-bit Cmyk alpha

#define OY_TYPE_123_16 (oyChannels_m(3)|oyDataType_m(oyUINT16))

16-bit RGB/...

#define OY_TYPE_123_8 (oyChannels_m(3)|oyDataType_m(oyUINT8))

8-bit RGB/YUV/XYZ/...

#define OY_TYPE_123_DBL (oyChannels_m(3)|oyDataType_m(oyDOUBLE))

64-bit double RGB/...

#define OY_TYPE_123_FLOAT (oyChannels_m(3)|oyDataType_m(oyFLOAT))

32-bit float RGB/...

#define OY_TYPE_123_HALF (oyChannels_m(3)|oyDataType_m(oyHALF))

16-bit float RGB/...

#define OY_TYPE_123A_16 (oyChannels_m(4)|oyDataType_m(oyUINT16))

16-bit RGB/... alpha

#define OY_TYPE_123A_8 (oyChannels_m(4)|oyDataType_m(oyUINT8))

8-bit RGB/... alpha

#define OY_TYPE_123A_DBL (oyChannels_m(4)|oyDataType_m(oyDOUBLE))

64-bit double RGB/... alpha

#define OY_TYPE_123A_FLOAT (oyChannels_m(4)|oyDataType_m(oyFLOAT))

32-bit float RGB/... alpha

#define OY_TYPE_123A_HALF (oyChannels_m(4)|oyDataType_m(oyHALF))

16-bit float RGB/... alpha

#define OY_TYPE_123AZ_DBL (oyChannels_m(5)|oyDataType_m(oyDOUBLE))

64-bit double RGB/... alpha + Z

#define OY_TYPE_123AZ_FLOAT (oyChannels_m(5)|oyDataType_m(oyFLOAT))

32-bit float RGB/... alpha + Z

#define OY_TYPE_123AZ_HALF (oyChannels_m(5)|oyDataType_m(oyHALF))

16-bit float RGB/... alpha + Z

#define OY_TYPE_1_16 (oyChannels_m(1)|oyDataType_m(oyUINT16))

16-bit Gray

#define OY_TYPE_1_8 (oyChannels_m(1)|oyDataType_m(oyUINT8))

8-bit Gray

#define oyByteSwap_m | ( |  | x | ) | ((x) << 23)

Set byte swapping for integers larger than 8 byte in oyPixel_t

#define oyChannels_m | ( |  | c | ) | (c)

Set channels count in oyPixel_t

Referenced by oyConversion_s::oyConversion_CreateBasicPixelsFromBuffers(), oyConversion_CreateFromImage(), and oyFilterPlug_s::oyFilterPlug_ResolveImage().

#define oyColourOffset_m | ( |  | o | ) | ((o) << 8)

Set offset count to first colour channel in oyPixel_t

#define oyDataType_m | ( |  | t | ) | ((t) << 16)

Set oyDATATYPE_e in oyPixel_t

Referenced by oyConversion_s::oyConversion_CreateBasicPixelsFromBuffers(), oyConversion_CreateFromImage(), and oyFilterPlug_s::oyFilterPlug_ResolveImage().

#define oyFlavor_m | ( |  | p | ) | ((f) << 22)

Set min is white in oyPixel_t

#define oyPlanar_m | ( |  | p | ) | ((p) << 21)

Set planar instead of interwoven colour channels in oyPixel_t

#define oySwapColourChannels_m | ( |  | s | ) | ((s) << 20)

Set swapping of colour channels in oyPixel_t , e.g. BGR

#define oyToByteswap_m | ( |  | x | ) | (((x) >> 23)&1)

Get byte swapping for integers larger than 8 byte in oyPixel_t

#define oyToChannels_m | ( |  | c | ) | ((c)&255)

Get channels count in oyPixel_t

Referenced by oyConversion_CreateFromImage(), oyFilterPlug_s::oyFilterPlug_ResolveImage(), oyImage_s::oyImage_Create(), oyImage_s::oyImage_SetCritical(), and oyArray2d_s::oyImage_WritePPM().

#define oyToColourOffset_m | ( |  | o | ) | (((o) >> 8)&255)

Get offset count to first colour channel in oyPixel_t

#define oyToDataType_m | ( |  | t | ) | ((oyDATATYPE_e)(((t) >> 16)&15))

Get oyDATATYPE_e in oyPixel_t

Referenced by oyFilterPlug_s::oyFilterPlug_ResolveImage(), oyImage_s::oyImage_Create(), oyImage_s::oyImage_FillArray(), oyImage_s::oyImage_ReadArray(), oyImage_s::oyImage_SetCritical(), and oyArray2d_s::oyImage_WritePPM().

#define oyToFlavor_m | ( |  | f | ) | (((f) >> 22)&1)

Get min is white in oyPixel_t

#define oyToPlanar_m | ( |  | p | ) | (((p) >> 21)&1)

Get planar instead of interwoven colour channels in oyPixel_t

#define oyToSwapColourChannels_m | ( |  | s | ) | (((s) >> 20)&1)

Get swapping of colour channels in oyPixel_t , e.g. BGR

## Typedef Documentation

oyPixel_t

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

enum oyCHANNELTYPE_e

Channels types of Colours.

This type is useful to present colour manipulation UI elements in a sensible way.

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
oyCHANNELTYPE_OTHER | other
oyCHANNELTYPE_LIGHTNESS | pure lightness
oyCHANNELTYPE_COLOUR | pure colour
oyCHANNELTYPE_COLOUR_LIGHTNESS | lightness and colour
oyCHANNELTYPE_COLOUR_LIGHTNESS_PREMULTIPLIED | premultiplied lightness and colour
oyCHANNELTYPE_DEPTH | depth field
oyCHANNELTYPE_ALPHA1 | alpha
oyCHANNELTYPE_ALPHA2 | alpha2
oyCHANNELTYPE_ALPHA3 | alpha3
oyCHANNELTYPE_U | u
oyCHANNELTYPE_V | v

enum oyDATATYPE_e

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

enum oyLAYOUT_e

Pixel mask descriptions.

Enumerator
oyLAYOUT | remembering the layout See also oyPixel_t
oyPOFF_X | pixel count x offset
oyPOFF_Y | pixel count y offset
oyCOFF | channel offset
oyDATA_SIZE | sample size in byte
oyCHANS | number of channels
oyCHAN0 | first colour channel position

enum oyPIXEL_ACCESS_TYPE_e

Pixel access types.

Version
  Oyranos: 0.1.8

Since
  2008/00/00 (Oyranos: 0.1.8)

Date
  2008/00/00

Enumerator
oyPIXEL_ACCESS_IMAGE | image accessor
oyPIXEL_ACCESS_POINT | dont use
oyPIXEL_ACCESS_LINE | dont use

## Function Documentation

oyCHANNELTYPE_e oyICCColourSpaceToChannelLayout | ( | icColorSpaceSignature | sig,
|  | int | pos
| ) |  |

describe a channels characteristic

Function: oyICCColourSpaceToChannelLayout

Version
  Oyranos: 0.1.8

Since
  2008/07/29 (Oyranos: 0.1.8)

Date
  2008/07/29

References oyCHANNELTYPE_COLOUR, oyCHANNELTYPE_COLOUR_LIGHTNESS, oyCHANNELTYPE_LIGHTNESS, oyCHANNELTYPE_OTHER, and oyICCColourSpaceGetChannelCount().