Image Containers
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Data Structures | Macros | Typedefs | Enumerations | Functions
Image Containers
Conversion

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

## ◆ OY_TYPE_1234_8

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

8-bit Cmyk

## ◆ OY_TYPE_1234A_8

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

8-bit Cmyk alpha

## ◆ OY_TYPE_123_16

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

16-bit RGB/...

## ◆ OY_TYPE_123_8

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

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

## ◆ OY_TYPE_123_DBL

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

64-bit double RGB/...

## ◆ OY_TYPE_123_FLOAT

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

32-bit float RGB/...

Examples:
  tutorial1.c.

## ◆ OY_TYPE_123_HALF

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

16-bit float RGB/...

## ◆ OY_TYPE_123A_16

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

16-bit RGB/... alpha

## ◆ OY_TYPE_123A_8

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

8-bit RGB/... alpha

## ◆ OY_TYPE_123A_DBL

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

64-bit double RGB/... alpha

## ◆ OY_TYPE_123A_FLOAT

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

32-bit float RGB/... alpha

## ◆ OY_TYPE_123A_HALF

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

16-bit float RGB/... alpha

## ◆ OY_TYPE_123AZ_DBL

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

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

## ◆ OY_TYPE_123AZ_FLOAT

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

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

## ◆ OY_TYPE_123AZ_HALF

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

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

## ◆ OY_TYPE_1_16

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

16-bit Gray

## ◆ OY_TYPE_1_8

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

8-bit Gray

## ◆ oyByteswap_m

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

Set byte swapping for integers larger than 8 byte in oyPixel_t

## ◆ oyChannels_m

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

Set channels count in oyPixel_t

Examples:
  image2pdf.c, and oyranos_cmm_oJPG.c.

Referenced by oyConversion_s::oyConversion_CreateBasicPixelsFromBuffers().

## ◆ oyColorOffset_m

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

Set offset count to first color channel in oyPixel_t

## ◆ oyDataType_m

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

Set oyDATATYPE_e in oyPixel_t

Examples:
  image2pdf.c, and oyranos_cmm_oJPG.c.

## ◆ oyFlavor_m

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

Set min is white in oyPixel_t

## ◆ oyPlanar_m

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

Set planar instead of interwoven color channels in oyPixel_t

## ◆ oySwapColorChannels_m

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

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

## ◆ oyToByteswap_m

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

Get byte swapping for integers larger than 8 byte in oyPixel_t

## ◆ oyToChannels_m

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

Get channels count in oyPixel_t

Referenced by oyConversion_s::oyConversion_CreateBasicPixelsFromBuffers(), oyImage_s::oyImage_Create(), oyImage_s::oyImage_SetArray2dPointContinous(), and oyPixelAccess_s::oyPixelAccess_Show().

## ◆ oyToColorOffset_m

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

Get offset count to first color channel in oyPixel_t

## ◆ oyToDataType_m

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

Get oyDATATYPE_e in oyPixel_t

Referenced by oyImage_s::oyImage_Create(), oyImage_s::oyImage_FillArray(), oyImage_s::oyImage_ReadArray(), and oyImage_s::oyImage_SetArray2dPointContinous().

## ◆ oyToFlavor_m

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

Get min is white in oyPixel_t

## ◆ oyToPlanar_m

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

Get planar instead of interwoven color channels in oyPixel_t

## ◆ oyToSwapColorChannels_m

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

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

## Typedef Documentation

## ◆ oyPixel_t

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

## ◆ oyCHANNELTYPE_e

enum oyCHANNELTYPE_e

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

## ◆ oyDATATYPE_e

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

Examples:
  oyranos_cmm_oJPG.c.

## ◆ oyLAYOUT_e

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

## ◆ oyPIXEL_ACCESS_TYPE_e

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

## ◆ oyDataTypeGetSize()

size_t oyDataTypeGetSize | ( | oyDATATYPE_e | data_type | ) |

oyDATATYPE_e to byte mapping

Version
  Oyranos: 0.9.0

Date
  2012/10/22

Since
  2007/11/00 (Oyranos: 0.1.8)

Examples:
  oyranos_cmm_oJPG.c.

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

Referenced by oyArray2d_s::oyArray2d_Create(), oyArray2d_s::oyArray2d_Reset(), oyArray2d_s::oyArray2d_SetFocus(), oyArray2d_s::oyArray2d_SetRows(), oyImage_s::oyImage_FillArray(), oyImage_s::oyImage_ReadArray(), and oyImage_s::oyImage_SetArray2dPointContinous().

## ◆ oyDataTypeToText()

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.

## ◆ oyICCColorSpaceToChannelLayout()

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