Canvas file format

From Atari Wiki
Revision as of 21:23, 2 January 2017 by Lp (talk | contribs) (New page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Canvas            *.CNV, *.CPT

Canvas is a simple drawing program for the Atari ST. The simplest file
format it uses is .CNV. The format has no infor on the resolution of 
the image. The colors are stored in VDI order.

   48 bytes       palette, value 0-7 per byte, RGB in VDI order.
32000 bytes       image data


The CPT format is a compressed format:
   16 words       palette
    1 word        resolution (0=low, 1=med, 2=high resolution)
  ??? words       compressed data, uncompressed 32000 bytes
  
Packing algorithm: first all runlength data is transfered. Then the
gaps that haven't been filled with runlengthdata is filled with the 
remaining data from file.
Runlength data:
    1 word        repeat count
    1 word        offset
    n words       run length data (n=4 low, 2 med, 1 high)
The n words run length data are repeated (repeat count +1) times from 
offset bytes from the start of the file. When repeat count $FFFF signifies 
the end of the run length data (the offset and run length data still folow 
the $FFFF repeat count).
  ??? words       data to fill the gaps that haven't been filled with run 
length data.

Back to ST Picture Formats