Difference between revisions of "Graphic file formats"

From Ninerpedia
Jump to navigation Jump to search
(Created page with "== MyArt format == Images for MyArt (Geneve painting program) are saved in the following format: {| class="tifiles" |- ! style="width:4em" | ! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6 ...")
 
Line 100: Line 100:


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.
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.
[[Category:Geneve]]

Revision as of 12:46, 20 October 2011

MyArt format

Images for MyArt (Geneve painting program) are saved in the following format:

0 1 2 3 4 5 6 7
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
0x20 Color 15 Line Line Line
... ... ... ... ...

The flag byte in position 1 varies between different programs (MyArt, YAPP etc.). The specification of the YAPP program defines it this way:

0 1 2 3 4 5 6 7
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.


0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 Red 0 Blue 0 0 0 0 0 Green

Line entries look like this:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Color 0 0 0 Length

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.