Merge branch 'master' of git.mutabah.net:acess2
[tpg/acess2.git] / Notes / SIF.txt
1 === Simple Image Format ===
2
3 U16     Magic   0x51F0  - This determines the endianness of the file
4 U16     Flags
5         > 0-2: Compression (0: Uncompressed, 1: RLE, 2: zlib, 3: RLE-Channel)
6         > 3-5: Format (0: ARGB, 1: RGB
7 U16     Width
8 U16     Height
9 <DATA>
10
11
12 === Compression Formats ===
13 0 - Uncompressed
14         The file data is a linear sequence of Width * Height 32-bit ARGB
15         words (in file endianness, determined by the magic)
16
17 1 - RLE-4
18         7-bit length followed by a 32-bit value that is repeated `n` times
19         (if bit 7 of the length byte is set, the next `n` 32-bit words are
20         verbatim)
21
22 2 - zlib
23         The image data is a zlib stream of 32-bit xRGB words
24
25 3 - RLE-Channel
26         The data is the alpha values, followed by red, then green, then blue
27         encoded as RLE with a 7-bit length and a verbatim flag (same as mode
28         1, except with 8-bit values instead of 32-bit) 

UCC git Repository :: git.ucc.asn.au