Hey biohax, here's the format for Image and Picture files for the TI-84 Plus C Silver Edition, provided by Kerm!
- As you'd expect, the files follow the standard header format, more or less, with a few notable exceptions.
- Picture files have these header bytes in the variable header (ie, the header that starts at offset 0x55):
-- 0x04 (variable type ID) = 0x07 (tPictObj)
-- 0x05 (variable name) = 0x60 (tVarPict), 0x01 (Pic2) (or whatever)
-- 0x0D (version) = 0x0A (TI-84+CSE)
-- 0x0E (flag) = 0x80 (archived)
- Image files have these header bytes in the variable header (ie, the header that starts at offset 0x55):
-- 0x04 (variable type ID) = 0x1A (tImgObj)
-- 0x05 (variable name) = 0x3C (tVarImg), 0x01 (Image2) (or whatever)
-- 0x0D (version) = 0x0A (TI-84+CSE)
-- 0x0E (flag) = 0x80 (archived)
- Picture file contents: 265 columns, 165 rows. The image data is (266/2)*165 bytes, so two pixels are packed into each byte, and each row has an extra 0 nibble at the end to pad it out to exactly 133 bytes. Pixels are stored in row-major order: left to right, then top to bottom. The nibble for each pixel is an indexed color: 0 = transparent, 1-15 = a color. The color table is as follows (please excuse the PHP formatting; these are (R,G,B) triples, starting with color 1):
-- array(array(0,0,31), array(31,0,0), array(0,0,0), array(31,0,31), array(0,39,0), array(31,35,4), array(22,8,0), array(0,0,15), array(0,36,31), array(31,63,0), array(31,63,31), array(28,56,2
, array(24,48,24), array(17,34,17), array(10,21,10));
- Image file contents: 82 rows, 133 columns, so every pixel is expanded to be 2x2 LCD pixels. Each pixel stored takes two bytes, and is packed as a 5-6-5 R-G-B value. Although image files are stored in row-major order, they are stored bottom-to-top, like BMP images, so left-to-right and bottom-to-top. Inexplicably, each row is padded with two extra bytes, bringing it to 268 bytes wide. The total data in an Image is therefore 268*82 bytes.
Hope this helps! I'd be happy to answer any follow-up questions.