Screen pixel format types
Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities
Types of supported pixel formats
Synopsis:
#include <screen/screen.h>
enum {
SCREEN_FORMAT_BYTE = 1,
SCREEN_FORMAT_RGBA4444 = 2,
SCREEN_FORMAT_RGBX4444 = 3,
SCREEN_FORMAT_RGBA5551 = 4,
SCREEN_FORMAT_RGBX5551 = 5,
SCREEN_FORMAT_RGB565 = 6,
SCREEN_FORMAT_RGB888 = 7,
SCREEN_FORMAT_RGBA8888 = 8,
SCREEN_FORMAT_RGBX8888 = 9,
SCREEN_FORMAT_YVU9 = 10,
SCREEN_FORMAT_YUV420 = 11,
SCREEN_FORMAT_NV12 = 12,
SCREEN_FORMAT_YV12 = 13,
SCREEN_FORMAT_UYVY = 14,
SCREEN_FORMAT_YUY2 = 15,
SCREEN_FORMAT_YVYU = 16,
SCREEN_FORMAT_V422 = 17,
SCREEN_FORMAT_AYUV = 18,
SCREEN_FORMAT_NV16 = 19,
SCREEN_FORMAT_P010 = 20,
SCREEN_FORMAT_BGRA8888 = 21,
SCREEN_FORMAT_BGRX8888 = 22,
SCREEN_FORMAT_RGBA1010102 = 23,
SCREEN_FORMAT_RGBX1010102 = 24,
SCREEN_FORMAT_BGRA1010102 = 25,
SCREEN_FORMAT_BGRX1010102 = 26,
SCREEN_FORMAT_NFORMATS
};
Data:
- SCREEN_FORMAT_BYTE
- This is a multipurpose byte-based array of data.
- SCREEN_FORMAT_RGBA4444
- 16 bits per pixel (4 bits per channel) RGB with alpha channel
- SCREEN_FORMAT_RGBX4444
- 16 bits per pixel (4 bits per channel) RGB with alpha channel disregarded
- SCREEN_FORMAT_RGBA5551
- 16 bits per pixel, 2 bytes containing R, G, and B values (5 bits per channel with single-bit alpha channel)
- SCREEN_FORMAT_RGBX5551
- 16 bits per pixel, 2 bytes containing R, G, and B values (5 bits per channel with single-bit alpha channel disregarded)
- SCREEN_FORMAT_RGB565
- 16 bits per pixel; uses five bits for red, six bits for green and five bits for blue.
- SCREEN_FORMAT_RGB888
- 24 bits per pixel (8 bits per channel) RGB
- SCREEN_FORMAT_RGBA8888
- 32 bits per pixel (8 bits per channel) RGB with alpha channel
- SCREEN_FORMAT_RGBX8888
- 32 bits per pixel (8 bits per channel) RGB with alpha channel disregarded
- SCREEN_FORMAT_YVU9
- 9 bits per pixel planar YUV format.
- SCREEN_FORMAT_YUV420
- Standard NTSC TV transmission format.
- SCREEN_FORMAT_NV12
- 12 bits per pixel planar YUV format.
- SCREEN_FORMAT_YV12
- 12 bits per pixel planar YUV format.
- SCREEN_FORMAT_UYVY
- 16 bits per pixel packed YUV format.
- SCREEN_FORMAT_YUY2
- 16 bits per pixel packed YUV format.
- SCREEN_FORMAT_YVYU
- 16 bits per pixel packed YUV format.
- SCREEN_FORMAT_V422
- Packed YUV format.
- SCREEN_FORMAT_AYUV
- Packed YUV format.
- SCREEN_FORMAT_NV16
- 8-bit Y plane; 2x1-subsampled, interleaved U and V planes (Like NV12 but with chroma for each row); this format is associated with the preprocessor definition SCREEN_FORMAT_NV16.
- SCREEN_FORMAT_P010
- 24 bits per macro pixel planar YUV 4:2:0 format.
- SCREEN_FORMAT_BGRA8888
- 32 bits per pixel (8 bits per channel) BGR with alpha channel.
- SCREEN_FORMAT_BGRX8888
- 32 bits per pixel (8 bits per channel) BGR with alpha channel disregarded.
- SCREEN_FORMAT_RGBA1010102
- A four-component, 32-bit unsigned integer format that supports 10 bits for each color and 2 bits for alpha.
- SCREEN_FORMAT_RGBX1010102
- A four-component, 32-bit unsigned integer format that supports 10 bits for each color and 2 unused MSB bits.
- SCREEN_FORMAT_BGRA1010102
- A four-component, 32-bit unsigned integer format that supports 10 bits for each color and 2 bits for alpha.
- SCREEN_FORMAT_BGRX1010102
- A four-component, 32-bit unsigned integer format that supports 10 bits for each color and 2 unused MSB bits.
- SCREEN_FORMAT_NFORMATS
- Number of pixel formats plus 1 (0 is not a valid format).
Library:
libscreenDescription:
Formats with an alpha channel will have source alpha enabled automatically. Applications that want the Screen API to disregard the alpha channel can choose a pixel format with an X.
Page updated: