Cogl.PixelFormat
Description: Reference for Cogl.PixelFormat

### Enumeration

# CoglPixelFormat

#### 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: | 0.8

#### Members

Name | Description
--- | ---
`COGL_PIXEL_FORMAT_ANY` | Any format.
`COGL_PIXEL_FORMAT_A_8` | 8 bits alpha mask.
`COGL_PIXEL_FORMAT_RGB_565` | RGB, 16 bits.
`COGL_PIXEL_FORMAT_RGBA_4444` | RGBA, 16 bits.
`COGL_PIXEL_FORMAT_RGBA_5551` | RGBA, 16 bits.
`COGL_PIXEL_FORMAT_YUV` | Not currently supported.
`COGL_PIXEL_FORMAT_G_8` | Single luminance component.
`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.
`COGL_PIXEL_FORMAT_RGB_888` | RGB, 24 bits.
`COGL_PIXEL_FORMAT_BGR_888` | BGR, 24 bits.
`COGL_PIXEL_FORMAT_RGBA_8888` | RGBA, 32 bits.
`COGL_PIXEL_FORMAT_BGRA_8888` | BGRA, 32 bits.
`COGL_PIXEL_FORMAT_ARGB_8888` | ARGB, 32 bits.
`COGL_PIXEL_FORMAT_ABGR_8888` | ABGR, 32 bits.
`COGL_PIXEL_FORMAT_RGBA_1010102` | RGBA, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_BGRA_1010102` | BGRA, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_XRGB_2101010` | No description available.
`COGL_PIXEL_FORMAT_ARGB_2101010` | ARGB, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_XBGR_2101010` | No description available.
`COGL_PIXEL_FORMAT_ABGR_2101010` | ABGR, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_RGBA_FP_16161616` | RGBA half floating point, 64 bit.
`COGL_PIXEL_FORMAT_BGRA_FP_16161616` | BGRA half floating point, 64 bit.
`COGL_PIXEL_FORMAT_XRGB_FP_16161616` | No description available.
`COGL_PIXEL_FORMAT_ARGB_FP_16161616` | ARGB half floating point, 64 bit.
`COGL_PIXEL_FORMAT_XBGR_FP_16161616` | No description available.
`COGL_PIXEL_FORMAT_ABGR_FP_16161616` | ABGR half floating point, 64 bit.
`COGL_PIXEL_FORMAT_RGBA_8888_PRE` | Premultiplied RGBA, 32 bits.
`COGL_PIXEL_FORMAT_BGRA_8888_PRE` | Premultiplied BGRA, 32 bits.
`COGL_PIXEL_FORMAT_ARGB_8888_PRE` | Premultiplied ARGB, 32 bits.
`COGL_PIXEL_FORMAT_ABGR_8888_PRE` | Premultiplied ABGR, 32 bits.
`COGL_PIXEL_FORMAT_RGBA_4444_PRE` | Premultiplied RGBA, 16 bits.
`COGL_PIXEL_FORMAT_RGBA_5551_PRE` | Premultiplied RGBA, 16 bits.
`COGL_PIXEL_FORMAT_RGBA_1010102_PRE` | Premultiplied RGBA, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_BGRA_1010102_PRE` | Premultiplied BGRA, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_ARGB_2101010_PRE` | Premultiplied ARGB, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_ABGR_2101010_PRE` | Premultiplied ABGR, 32 bits, 10 bpc.
`COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE` | Premultiplied RGBA half floating point, 64 bit.
`COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE` | Premultiplied BGRA half floating point, 64 bit.
`COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE` | Premultiplied ARGB half floating point, 64 bit.
`COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE` | Premultiplied ABGR half floating point, 64 bit.
`COGL_PIXEL_FORMAT_DEPTH_16` | No description available.
`COGL_PIXEL_FORMAT_DEPTH_32` | No description available.
`COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8` | No description available.