View Single Post
Old 05-09-2024, 02:58 AM   #10
chrisridd
Guru
chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.chrisridd ought to be getting tired of karma fortunes by now.
 
chrisridd's Avatar
 
Posts: 983
Karma: 2209358
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, PocketBook InkPad Color 3
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.
Attached Files
File Type: txt palette.txt (3.4 KB, 222 views)
chrisridd is offline   Reply With Quote