Christopher Cave makes some magical things to make me read } Would someone please point me in the direction of documentation } on PIC files?
>From head to tail of file: Word: width Word: height Word: number of row (special, more later) Byte: mode Byte: Spare (but might be set to 64 to force mode 33 on some _piq file such as the colorful papa512_piq) Mode can be 0 (for mode 4), 8 or any GD2 values (33 for Q40, 32 for QPC, other mode might also exist, see GD2 documentation) Then it is followed by row*height bytes. Mode 8 and mode 4 are encoded as on the original QL. GD2 mode are described in GD2 document (2 bytes for one pixel): mode 33: Green 5 bit, Red 5 bit, Blue 5 bit, Intensity 1 bit mode 32: Green top 3 bit, Blue 5 bit, Red 5 bit, Green 3 bit (simpler in Intel Mode: Red 5, Green 6, Blue 5) Beware of the alignment constraint for each line if you intended to write some pic file. Hope this help.