Cogl.PixelFormat
Description: Reference for Cogl.PixelFormat

### Enumeration

# CoglPixelFormat

since: 13

#### Declaration

    flags Cogl.PixelFormat

#### Description [src]

Pixel formats used by Cogl. For the formats with a byte per component, the order of the components specify the order in increasing memory addresses. So for example `COGL_PIXEL_FORMAT_RGB_888` would have the red component in the lowest address, green in the next address and blue after that regardless of the endianness of the system.

For the formats with non byte aligned components the component order specifies the order within a 16-bit or 32-bit number from most significant bit to least significant. So for `COGL_PIXEL_FORMAT_RGB_565`, the red component would be in bits 11-15, the green component would be in 6-11 and the blue component would be in 1-5. Therefore the order in memory depends on the endianness of the system.

When uploading a texture `COGL_PIXEL_FORMAT_ANY` can be used as the internal format. Cogl will try to pick the best format to use internally and convert the texture data if necessary.

Available since: 13

#### Members

`COGL_PIXEL_FORMAT_ANY`

  Any format.

  - Value: `0`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_A_8`

  8 bits alpha mask.

  - Value: `17`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGB_565`

  RGB, 16 bits.

  - Value: `4`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_4444`

  RGBA, 16 bits.

  - Value: `21`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_5551`

  RGBA, 16 bits.

  - Value: `22`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_YUV`

  Not currently supported.

  - Value: `7`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_G_8`

  Single luminance component.

  - Value: `8`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_G_16`

  Single luminance component, 16 bits.

  - Value: `14`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RG_88`

  RG, 16 bits. Note that red-green textures are only available if `COGL_FEATURE_ID_TEXTURE_RG` is advertised. See `cogl_texture_set_components()` for details.

  - Value: `9`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RG_1616`

  RG, 32 bits.

  - Value: `15`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGB_888`

  RGB, 24 bits.

  - Value: `2`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGR_888`

  BGR, 24 bits.

  - Value: `34`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBX_8888`

  RGBX, 32 bits.

  - Value: `3`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_8888`

  RGBA, 32 bits.

  - Value: `19`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRX_8888`

  BGRX, 32 bits.

  - Value: `35`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_8888`

  BGRA, 32 bits.

  - Value: `51`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XRGB_8888`

  XRGB, 32 bits.

  - Value: `67`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_8888`

  ARGB, 32 bits.

  - Value: `83`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XBGR_8888`

  XBGR, 32 bits.

  - Value: `99`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_8888`

  ABGR, 32 bits.

  - Value: `115`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_1010102`

  RGBA, 32 bits, 10 bpc.

  - Value: `29`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_1010102`

  BGRA, 32 bits, 10 bpc.

  - Value: `61`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XRGB_2101010`

  XRGB, 32 bits, 10 bpc.

  - Value: `77`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_2101010`

  ARGB, 32 bits, 10 bpc.

  - Value: `93`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XBGR_2101010`

  XBGR, 32 bits, 10 bpc.

  - Value: `109`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_2101010`

  ABGR, 32 bits, 10 bpc.

  - Value: `125`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBX_FP_16161616`

  RGBX half floating point, 64 bit.

  - Value: `11`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_FP_16161616`

  RGBA half floating point, 64 bit.

  - Value: `27`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRX_FP_16161616`

  BGRX half floating point, 64 bit.

  - Value: `43`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_FP_16161616`

  BGRA half floating point, 64 bit.

  - Value: `59`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XRGB_FP_16161616`
  No description available.
  - Value: `75`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_FP_16161616`

  ARGB half floating point, 64 bit.

  - Value: `91`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_XBGR_FP_16161616`
  No description available.
  - Value: `107`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_FP_16161616`

  ABGR half floating point, 64 bit.

  - Value: `123`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_8888_PRE`

  Premultiplied RGBA, 32 bits.

  - Value: `147`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_8888_PRE`

  Premultiplied BGRA, 32 bits.

  - Value: `179`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_8888_PRE`

  Premultiplied ARGB, 32 bits.

  - Value: `211`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_8888_PRE`

  Premultiplied ABGR, 32 bits.

  - Value: `243`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_4444_PRE`

  Premultiplied RGBA, 16 bits.

  - Value: `149`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_5551_PRE`

  Premultiplied RGBA, 16 bits.

  - Value: `150`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_1010102_PRE`

  Premultiplied RGBA, 32 bits, 10 bpc.

  - Value: `157`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_1010102_PRE`

  Premultiplied BGRA, 32 bits, 10 bpc.

  - Value: `189`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_2101010_PRE`

  Premultiplied ARGB, 32 bits, 10 bpc.

  - Value: `221`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_2101010_PRE`

  Premultiplied ABGR, 32 bits, 10 bpc.

  - Value: `253`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE`

  Premultiplied RGBA half floating point, 64 bit.

  - Value: `155`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE`

  Premultiplied BGRA half floating point, 64 bit.

  - Value: `187`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE`

  Premultiplied ARGB half floating point, 64 bit.

  - Value: `219`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE`

  Premultiplied ABGR half floating point, 64 bit.

  - Value: `251`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_DEPTH_16`
  No description available.
  - Value: `265`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_DEPTH_32`
  No description available.
  - Value: `259`
  - Nickname: `None`
  - Available since: 13
`COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8`
  No description available.
  - Value: `771`
  - Nickname: `None`
  - Available since: 13