The Reunion .PIC file format

Here's a description of .PIC images, a custom file format used in Merit's Galactic Reunion, published by Grandslam and designed by Amnesty Design. It uses simple run-length encoding, and includes a palette.


Header:

8 bytes "SpidyGfx", magic. 
2 bytes width (little endian)
2 bytes height


Image data: 

A byte x < 0xC0 means the pixel value x.
Otherwise, subtract 0xC0. This is the number of times to repeat the next byte. 


After width*height pixels have been decoded:

1 bytes (unknown)
768 bytes palette (256 three bytes RGB colours)

The images that come with the game are all organised so that no repeat will go across line boundaries. I don't know if the game actually requires this. Also note that the only way to encode pixels over 0xC0 is to prefix them with a count, possibly just 0xC1.

Here are some samples:

pic2ppm, a tiny stupid C app to convert .PIC files to standard .ppm.

Here's a little log I wrote while decoding, nothing interesting except for maybe the train of thought.

Reunion security codes.

Reunion itself (english installed version), since the makers are long dead (without ever releasing the sequel promised at the end of the game) :(