pywrap: input: Fix & constructor for GP_Event.
[gfxprim.git] / doc / pixel_types.txt
blobb54ad7a850519a91dfe4526714abe8734bb6c8bf
1 Supported pixel sizes
2 ---------------------
4 The default maximum size of a single pixel is 32 bits. The limitations would
5 be analogous for other settings (8, 16 and 64).
7 Pixel sizes 8, 16 and 32 are supported on all systems and generally very efficient
8 (assignment is used for all operations). 24 bpp is supported, but the operations may be
9 slightly slower.
11 Pixel sizes 1, 2 and 4 depend on bit-endian setting and are supported on all systems.
12 Subcontext operations and blits may be slower in case of a different subpixel alignment.
14 Pixel sizes not divisible by 8 and between 9 and 23 depend on the bit endian -
15 the endianity of the system must match the bit-endianity. The other combination 
16 is not supported at all - it would be too complicated and probably very inefficient
17 to decode/encode.
19 Pixel sizes between 25 and 31 are not supported at all, as these pixels might not fit
20 into a 32-bit byte-aligned window.
22 The pixel sizes to be supported must be explicitly listed in the configuration file,
23 each including the bit-endian if required (see below).
25 Supported pixel types
26 ---------------------
28 The supported files are declared in the configuration file and must use only the declared
29 pixel sizes with bit-endians. RGB, monochrome and palette formats are supported,
30 all with optional alpha channel (the alpha support level for palette types is not decided yet).
32 The pixel type
34 System endianity
35 ----------------
37 The library should work on both little-endian and big-endian systems.
38 Other variants than the standard (0123 and 3210) are not supported.
40 In case of pixel sizes between 9 and 23 (except for 16), the system endianity must match the
41 selected bit endianity. It is safe to build the library with the disallowed combination
42 format, as long as it is not used (compile-time warning is generated).
44 Bit-endianity
45 -------------
47 With 1, 2 and 4 bpp formats, there are two possible orders of pixels within a byte, 
48 both seen in the wild. The two are enumerated in `GP_BIT_ENDIAN`:
50 `GP_BIT_ENDIAN_LE`::
51     Less significant bits contain pixels with lower indices.
52     Also used for irrelevant bit-endianĀ (8, 15, 24, 32bpp).
53 `GP_BIT_ENDIAN_BE`::
54     More significant bits contain pixels with lower indices.