Oyranos Color Management System API - Version 0.9.6
Data Structures | Macros | Typedefs | Enumerations | Functions
Image Containers

Pixel buffer abstraction. More...

Collaboration diagram for Image Containers:

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
 A simple rectangle of double values. More...
 

Macros

#define oyChannels_m(c)   (c)
 
#define oyColorOffset_m(o)   ((o) << 8)
 
#define oyDataType_m(t)   ((t) << 16)
 
#define oySwapColorChannels_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 oyToColorOffset_m(o)   (((o) >> 8)&255)
 
#define oyToDataType_m(t)   ((oyDATATYPE_e)(((t) >> 16)&15))
 
#define oyToSwapColorChannels_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_COLOR,
  oyCHANNELTYPE_COLOR_LIGHTNESS, oyCHANNELTYPE_COLOR_LIGHTNESS_PREMULTIPLIED, oyCHANNELTYPE_DEPTH, oyCHANNELTYPE_ALPHA1,
  oyCHANNELTYPE_ALPHA2, oyCHANNELTYPE_ALPHA3, oyCHANNELTYPE_U, oyCHANNELTYPE_V
}
 Channels types of Colors. 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

size_t oyDataTypeGetSize (oyDATATYPE_e data_type)
 oyDATATYPE_e to byte mapping More...
 
const char * oyDataTypeToText (oyDATATYPE_e data_type)
 oyDATATYPE_e to string mapping More...
 
oyCHANNELTYPE_e oyICCColorSpaceToChannelLayout (icColorSpaceSignature sig, int pos)
 describe a channels characteristic More...
 

Detailed Description

Pixel buffer abstraction.

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/...

Examples:
tutorial1.c.
#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)
#define oyColorOffset_m (   o)    ((o) << 8)

Set offset count to first color channel in oyPixel_t

#define oyDataType_m (   t)    ((t) << 16)
#define oyFlavor_m (   p)    ((f) << 22)

Set min is white in oyPixel_t

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

Set planar instead of interwoven color channels in oyPixel_t

#define oySwapColorChannels_m (   s)    ((s) << 20)

Set swapping of color 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)
#define oyToColorOffset_m (   o)    (((o) >> 8)&255)

Get offset count to first color channel in oyPixel_t

#define oyToDataType_m (   t)    ((oyDATATYPE_e)(((t) >> 16)&15))
#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 color channels in oyPixel_t

#define oyToSwapColorChannels_m (   s)    (((s) >> 20)&1)

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

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 color channel offset (0 for RGB, 1 for ARGB)
P Planar bit: 0 - interwoven, 1 - one channel after the other
S Swap color 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 of Colors.

This type is useful to present color 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_COLOR 

pure color

oyCHANNELTYPE_COLOR_LIGHTNESS 

lightness and color

oyCHANNELTYPE_COLOR_LIGHTNESS_PREMULTIPLIED 

premultiplied lightness and color

oyCHANNELTYPE_DEPTH 

depth field

oyCHANNELTYPE_ALPHA1 

alpha

oyCHANNELTYPE_ALPHA2 

alpha2

oyCHANNELTYPE_ALPHA3 

alpha3

oyCHANNELTYPE_U 

u

oyCHANNELTYPE_V 

v

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

Examples:
oyranos_cmm_oJPG.c.
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 color channel position

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

size_t oyDataTypeGetSize ( oyDATATYPE_e  data_type)
const char* oyDataTypeToText ( oyDATATYPE_e  data_type)

oyDATATYPE_e to string mapping

Version
Oyranos: 0.9.0
Date
2012/10/22
Since
2007/11/26 (Oyranos: 0.1.8)
Examples:
oyranos_cmm_oJPG.c.

References oyDOUBLE, oyFLOAT, oyHALF, oyUINT16, oyUINT32, and oyUINT8.

oyCHANNELTYPE_e oyICCColorSpaceToChannelLayout ( icColorSpaceSignature  sig,
int  pos 
)

describe a channels characteristic

Function: oyICCColorSpaceToChannelLayout

Version
Oyranos: 0.1.8
Since
2008/07/29 (Oyranos: 0.1.8)
Date
2008/07/29

References oyCHANNELTYPE_COLOR, oyCHANNELTYPE_COLOR_LIGHTNESS, oyCHANNELTYPE_LIGHTNESS, oyCHANNELTYPE_OTHER, and oyICCColorSpaceGetChannelCount().