This is just a standard TGA. I'll document it here anyway though.
Header |
byte | ID Length |
byte | Colormap |
byte | Image Type |
word | First Colormap Entry |
word | Colormap Length |
byte | Bits per Color Entry |
word | X Origin of Image |
word | Y Origin of Image |
word | Image Width |
word | Image Height |
byte | BPP |
byte | Image Descriptor |
ID Length is the number of bytes in the ImageID block.
If Colormap==1, then the colormap block is present
Image types: 0 = No Image, 1 = Uncompressed Indexed,
2 = Uncompressed RGB, 3 = Uncompressed B&W, 4 = RLE Indexed,
5 = RLE RGB, 6 = RLE B&W.
Image Descriptor: bits 0-3 = # of attrs per pixel, bit 4 = Left/Right flipped, bit 5 = top/bottom flipped, bits 6-7 = 0
Immediately following the hearder is the ImageID block, which
describes authoring information among other things. This is then
followed by the colormap, if present.
Now the image data starts, it's format depends on the settings in
the header. Following that is the DeveloperData which includes
program-specific data, then the extension area. All of which
can be ignored.
|