Graphic file formats
Images for MyArt (Geneve painting program) are saved in the following format:
|0x00||Background||Flags||Color 0||Color 1||Color 2|
|0x08||Color 3||Color 4||Color 5||Color 6|
|0x10||Color 7||Color 8||Color 9||Color 10|
|0x18||Color 11||Color 12||Color 13||Color 14|
The flag byte in position 1 varies between different programs (MyArt, YAPP etc.). The specification of the YAPP program defines it this way:
|Inter- laced||res.||res.||1||1||G7, G6||1||0|
For the G7 graphics mode (256 columns, 256 colors) the line segments immediately start with byte 2. The 512 column mode (G6) uses an indexed color mode, so the file starts with a sequence of palette color definitions before the line segments.
Common values for the flag byte are 0x9E and 0xFA as used in MyArt; Barry Boone's MyArt loader considers 0xFF as indication for the G6 mode.
Line entries look like this:
where length can be any value from 0 - 511. Each line element is a sequence of pixels of the given color and the given length, extending to the right. The next line element is painted one position to the right of the end of the previous one. Each screen line must have a list of line elements that add up to its length exactly, so they must not reach beyond the right border of the screen. This allows the painting program to know when a line is complete and the painting continues in the next screen row.