Here's the palette using that colour averaging method BTW.
Remember you get raw resource files using "pbres -u theme.pbt name".
The resource file format for ibitmaps is:
2 bytes: little-endian width
2 bytes: little-endian height + transparency flag (0x8000)
2 bytes: little-endian bytes per pixel (eg 8)
2 bytes: little-endian bytes per scanline
A scanline is a row of pixels, with possibly extra padding on the right.
After the header you get the scanline for y=0, then the scanline for y=1, etc etc. Lines are encoded in top to bottom order.
After all the scanlines, if the transparency flag is set it seems there are some extra bytes. I haven't investigated how to interpret these.
|