Pixel format.
Defined in <SDL3/SDL_pixels.h>
typedef enum SDL_PixelFormat
{0,
SDL_PIXELFORMAT_UNKNOWN = 0x11100100u,
SDL_PIXELFORMAT_INDEX1LSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0, 1, 0), */
0x11200100u,
SDL_PIXELFORMAT_INDEX1MSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0, 1, 0), */
0x1c100200u,
SDL_PIXELFORMAT_INDEX2LSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_4321, 0, 2, 0), */
0x1c200200u,
SDL_PIXELFORMAT_INDEX2MSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX2, SDL_BITMAPORDER_1234, 0, 2, 0), */
0x12100400u,
SDL_PIXELFORMAT_INDEX4LSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0, 4, 0), */
0x12200400u,
SDL_PIXELFORMAT_INDEX4MSB = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0, 4, 0), */
0x13000801u,
SDL_PIXELFORMAT_INDEX8 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1), */
0x14110801u,
SDL_PIXELFORMAT_RGB332 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_332, 8, 1), */
0x15120c02u,
SDL_PIXELFORMAT_XRGB4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_4444, 12, 2), */
0x15520c02u,
SDL_PIXELFORMAT_XBGR4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_4444, 12, 2), */
0x15130f02u,
SDL_PIXELFORMAT_XRGB1555 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_1555, 15, 2), */
0x15530f02u,
SDL_PIXELFORMAT_XBGR1555 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_1555, 15, 2), */
0x15321002u,
SDL_PIXELFORMAT_ARGB4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_4444, 16, 2), */
0x15421002u,
SDL_PIXELFORMAT_RGBA4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_4444, 16, 2), */
0x15721002u,
SDL_PIXELFORMAT_ABGR4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_4444, 16, 2), */
0x15821002u,
SDL_PIXELFORMAT_BGRA4444 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_4444, 16, 2), */
0x15331002u,
SDL_PIXELFORMAT_ARGB1555 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_1555, 16, 2), */
0x15441002u,
SDL_PIXELFORMAT_RGBA5551 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_5551, 16, 2), */
0x15731002u,
SDL_PIXELFORMAT_ABGR1555 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_1555, 16, 2), */
0x15841002u,
SDL_PIXELFORMAT_BGRA5551 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_5551, 16, 2), */
0x15151002u,
SDL_PIXELFORMAT_RGB565 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_565, 16, 2), */
0x15551002u,
SDL_PIXELFORMAT_BGR565 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_565, 16, 2), */
0x17101803u,
SDL_PIXELFORMAT_RGB24 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0, 24, 3), */
0x17401803u,
SDL_PIXELFORMAT_BGR24 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0, 24, 3), */
0x16161804u,
SDL_PIXELFORMAT_XRGB8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_8888, 24, 4), */
0x16261804u,
SDL_PIXELFORMAT_RGBX8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX, SDL_PACKEDLAYOUT_8888, 24, 4), */
0x16561804u,
SDL_PIXELFORMAT_XBGR8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_8888, 24, 4), */
0x16661804u,
SDL_PIXELFORMAT_BGRX8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX, SDL_PACKEDLAYOUT_8888, 24, 4), */
0x16362004u,
SDL_PIXELFORMAT_ARGB8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_8888, 32, 4), */
0x16462004u,
SDL_PIXELFORMAT_RGBA8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA, SDL_PACKEDLAYOUT_8888, 32, 4), */
0x16762004u,
SDL_PIXELFORMAT_ABGR8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_8888, 32, 4), */
0x16862004u,
SDL_PIXELFORMAT_BGRA8888 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA, SDL_PACKEDLAYOUT_8888, 32, 4), */
0x16172004u,
SDL_PIXELFORMAT_XRGB2101010 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB, SDL_PACKEDLAYOUT_2101010, 32, 4), */
0x16572004u,
SDL_PIXELFORMAT_XBGR2101010 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR, SDL_PACKEDLAYOUT_2101010, 32, 4), */
0x16372004u,
SDL_PIXELFORMAT_ARGB2101010 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB, SDL_PACKEDLAYOUT_2101010, 32, 4), */
0x16772004u,
SDL_PIXELFORMAT_ABGR2101010 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR, SDL_PACKEDLAYOUT_2101010, 32, 4), */
0x18103006u,
SDL_PIXELFORMAT_RGB48 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGB, 0, 48, 6), */
0x18403006u,
SDL_PIXELFORMAT_BGR48 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGR, 0, 48, 6), */
0x18204008u,
SDL_PIXELFORMAT_RGBA64 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_RGBA, 0, 64, 8), */
0x18304008u,
SDL_PIXELFORMAT_ARGB64 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ARGB, 0, 64, 8), */
0x18504008u,
SDL_PIXELFORMAT_BGRA64 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_BGRA, 0, 64, 8), */
0x18604008u,
SDL_PIXELFORMAT_ABGR64 = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU16, SDL_ARRAYORDER_ABGR, 0, 64, 8), */
0x1a103006u,
SDL_PIXELFORMAT_RGB48_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGB, 0, 48, 6), */
0x1a403006u,
SDL_PIXELFORMAT_BGR48_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGR, 0, 48, 6), */
0x1a204008u,
SDL_PIXELFORMAT_RGBA64_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_RGBA, 0, 64, 8), */
0x1a304008u,
SDL_PIXELFORMAT_ARGB64_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ARGB, 0, 64, 8), */
0x1a504008u,
SDL_PIXELFORMAT_BGRA64_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_BGRA, 0, 64, 8), */
0x1a604008u,
SDL_PIXELFORMAT_ABGR64_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF16, SDL_ARRAYORDER_ABGR, 0, 64, 8), */
0x1b10600cu,
SDL_PIXELFORMAT_RGB96_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_RGB, 0, 96, 12), */
0x1b40600cu,
SDL_PIXELFORMAT_BGR96_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_BGR, 0, 96, 12), */
0x1b208010u,
SDL_PIXELFORMAT_RGBA128_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_RGBA, 0, 128, 16), */
0x1b308010u,
SDL_PIXELFORMAT_ARGB128_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_ARGB, 0, 128, 16), */
0x1b508010u,
SDL_PIXELFORMAT_BGRA128_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_BGRA, 0, 128, 16), */
0x1b608010u,
SDL_PIXELFORMAT_ABGR128_FLOAT = /* SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYF32, SDL_ARRAYORDER_ABGR, 0, 128, 16), */
0x32315659u, /**< Planar mode: Y + V + U (3 planes) */
SDL_PIXELFORMAT_YV12 = /* SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'), */
0x56555949u, /**< Planar mode: Y + U + V (3 planes) */
SDL_PIXELFORMAT_IYUV = /* SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'), */
0x32595559u, /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
SDL_PIXELFORMAT_YUY2 = /* SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'), */
0x59565955u, /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
SDL_PIXELFORMAT_UYVY = /* SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'), */
0x55595659u, /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
SDL_PIXELFORMAT_YVYU = /* SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'), */
0x3231564eu, /**< Planar mode: Y + U/V interleaved (2 planes) */
SDL_PIXELFORMAT_NV12 = /* SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'), */
0x3132564eu, /**< Planar mode: Y + V/U interleaved (2 planes) */
SDL_PIXELFORMAT_NV21 = /* SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'), */
0x30313050u, /**< Planar mode: Y + U/V interleaved (2 planes) */
SDL_PIXELFORMAT_P010 = /* SDL_DEFINE_PIXELFOURCC('P', '0', '1', '0'), */
0x2053454fu, /**< Android video texture format */
SDL_PIXELFORMAT_EXTERNAL_OES = /* SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ') */
/* Aliases for RGBA byte arrays of color data, for the current platform */
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_RGBX8888,
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_XRGB8888,
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_BGRX8888,
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_XBGR8888#else
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
SDL_PIXELFORMAT_RGBX32 = SDL_PIXELFORMAT_XBGR8888,
SDL_PIXELFORMAT_XRGB32 = SDL_PIXELFORMAT_BGRX8888,
SDL_PIXELFORMAT_BGRX32 = SDL_PIXELFORMAT_XRGB8888,
SDL_PIXELFORMAT_XBGR32 = SDL_PIXELFORMAT_RGBX8888#endif
} SDL_PixelFormat;
SDL's pixel formats have the following naming convention:
The 32-bit byte-array encodings such as RGBA32 are aliases for the appropriate 8888 encoding for the current platform. For example, RGBA32 is an alias for ABGR8888 on little-endian CPUs like x86, or an alias for RGBA8888 on big-endian CPUs.
This enum is available since SDL 3.1.3.