GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
A pixel defintions generated from gen/include/gfxprim_config.py. More...
#include <core/gp_clamp.h>
Go to the source code of this file.
Macros | |
#define | GP_PIXEL_CHANS_MAX 4 |
Maximal number of channels per all defined pixel types. | |
Typedefs | |
typedef enum gp_pixel_type | gp_pixel_type |
List of all pixel types. | |
Enumerations | |
enum | gp_pixel_type { GP_PIXEL_UNKNOWN , GP_PIXEL_RGB101010 , GP_PIXEL_xRGB8888 , GP_PIXEL_RGBA8888 , GP_PIXEL_RGB888 , GP_PIXEL_BGR888 , GP_PIXEL_RGB555 , GP_PIXEL_RGB565 , GP_PIXEL_RGB666 , GP_PIXEL_RGB332 , GP_PIXEL_CMYK8888 , GP_PIXEL_P2 , GP_PIXEL_P4 , GP_PIXEL_P8 , GP_PIXEL_G1_DB , GP_PIXEL_G2_DB , GP_PIXEL_G4_DB , GP_PIXEL_G1_UB , GP_PIXEL_G2_UB , GP_PIXEL_G4_UB , GP_PIXEL_G8 , GP_PIXEL_GA88 , GP_PIXEL_G16 , GP_PIXEL_MAX } |
List of all pixel types. More... | |
A pixel defintions generated from gen/include/gfxprim_config.py.
Definition in file gp_pixel.gen.h.
#define GP_PIXEL_CHANS_MAX 4 |
Maximal number of channels per all defined pixel types.
Definition at line 237 of file gp_pixel.gen.h.
typedef enum gp_pixel_type gp_pixel_type |
List of all pixel types.
The type always contains GP_PIXEL_UNKNOWN = 0 and GP_PIXEL_MAX as the last value (also the number of valid types) The types are numbered to use the entire range 0 .. GP_PIXEL_MAX-1. Some pixel types have aliases defined in gp_pixel_type_alias .
You can index the gp_pixel_types array with a pixel type to get detailed info about a pixel type at a runtime.
A pixel definition is a two layered, the top layer defines a packing i.e. gp_pixel_pack which describes pixel size and how pixels are stored in the pixmap buffer, then pixel type completes the definition by adding how channels are defined in each individual pixel.
Some functions need only pixel packing to operate correctly, e.g. if you need to fill in a buffer with a single pixel value, while other need to know the whole pixel type, e.g. filters that operate on individual channel values.
Note that two pixels can have the same channels, packing and size but stil differ e.g. RGB888 and BGR888 or same channels, different packing and size, e.g. RGB888 and xRGB8888 or same channels and size but different packing e.g. G1_UB and G1_DB which differ in the direction bits are read in the byte.
Also note that on the top of this pixel channels may not be linear and hence may need to be linearized before you can operate on the values. That is not encoded in the pixel type but rather at the gp_pixmap level where you can set a gp_gamma correction with gp_pixmap_gamma_set() independently of the pixel type.
enum gp_pixel_type |
List of all pixel types.
The type always contains GP_PIXEL_UNKNOWN = 0 and GP_PIXEL_MAX as the last value (also the number of valid types) The types are numbered to use the entire range 0 .. GP_PIXEL_MAX-1. Some pixel types have aliases defined in gp_pixel_type_alias .
You can index the gp_pixel_types array with a pixel type to get detailed info about a pixel type at a runtime.
A pixel definition is a two layered, the top layer defines a packing i.e. gp_pixel_pack which describes pixel size and how pixels are stored in the pixmap buffer, then pixel type completes the definition by adding how channels are defined in each individual pixel.
Some functions need only pixel packing to operate correctly, e.g. if you need to fill in a buffer with a single pixel value, while other need to know the whole pixel type, e.g. filters that operate on individual channel values.
Note that two pixels can have the same channels, packing and size but stil differ e.g. RGB888 and BGR888 or same channels, different packing and size, e.g. RGB888 and xRGB8888 or same channels and size but different packing e.g. G1_UB and G1_DB which differ in the direction bits are read in the byte.
Also note that on the top of this pixel channels may not be linear and hence may need to be linearized before you can operate on the values. That is not encoded in the pixel type but rather at the gp_pixmap level where you can set a gp_gamma correction with gp_pixmap_gamma_set() independently of the pixel type.
Enumerator | |
---|---|
GP_PIXEL_UNKNOWN | Pixel type UNKNOWN. Returned when pixel matching functions such as gp_pixel_rgb_lookup() when match wasn't found. |
GP_PIXEL_RGB101010 | Pixel type RGB101010. BBBBBBBBBBGGGGGGGGGGRRRRRRRRRRxx |
GP_PIXEL_xRGB8888 | Pixel type xRGB8888. BBBBBBBBGGGGGGGGRRRRRRRRxxxxxxxx |
GP_PIXEL_RGBA8888 | Pixel type RGBA8888. AAAAAAAABBBBBBBBGGGGGGGGRRRRRRRR |
GP_PIXEL_RGB888 | Pixel type RGB888. BBBBBBBBGGGGGGGGRRRRRRRR |
GP_PIXEL_BGR888 | Pixel type BGR888. RRRRRRRRGGGGGGGGBBBBBBBB |
GP_PIXEL_RGB555 | Pixel type RGB555. BBBBBGGGGGRRRRRx |
GP_PIXEL_RGB565 | Pixel type RGB565. BBBBBGGGGGGRRRRR |
GP_PIXEL_RGB666 | Pixel type RGB666. BBBBBBGGGGGGRRRRRR |
GP_PIXEL_RGB332 | Pixel type RGB332. BBGGGRRR |
GP_PIXEL_CMYK8888 | Pixel type CMYK8888. CCCCCCCCMMMMMMMMYYYYYYYYKKKKKKKK |
GP_PIXEL_P2 | Pixel type P2. PP |
GP_PIXEL_P4 | Pixel type P4. PPPP |
GP_PIXEL_P8 | Pixel type P8. PPPPPPPP |
GP_PIXEL_G1_DB | Pixel type G1_DB. V |
GP_PIXEL_G2_DB | Pixel type G2_DB. VV |
GP_PIXEL_G4_DB | Pixel type G4_DB. VVVV |
GP_PIXEL_G1_UB | Pixel type G1_UB. V |
GP_PIXEL_G2_UB | Pixel type G2_UB. VV |
GP_PIXEL_G4_UB | Pixel type G4_UB. VVVV |
GP_PIXEL_G8 | Pixel type G8. VVVVVVVV |
GP_PIXEL_GA88 | Pixel type GA88. VVVVVVVVAAAAAAAA |
GP_PIXEL_G16 | Pixel type G16. VVVVVVVVVVVVVVVV |
GP_PIXEL_MAX | Last valid pixel type has value GP_PIXEL_MAX-1. |
Definition at line 64 of file gp_pixel.gen.h.