ST Picture Formats: Difference between revisions

From Atari Wiki
Jump to navigation Jump to search
(Added MegaPaint format)
(Added Calamus Raster Graphic)
Line 90: Line 90:
 
COKE format *.TG1
 
COKE format *.TG1
 
MegaPaint *.BLD
 
MegaPaint *.BLD
  +
Calamus Raster Graphic *.CRG
 
PackBits Compression Algorithm
 
PackBits Compression Algorithm
 
   
 
 
Introductory Information
 
Introductory Information
 
------------------------
 
------------------------
Line 1,732: Line 1,733:
 
1 word image width in pixels [if negative, file is compressed]
 
1 word image width in pixels [if negative, file is compressed]
 
1 word image height in pixels
 
1 word image height in pixels
------
+
-------
 
4 bytes total for header
 
4 bytes total for header
   
Line 1,744: Line 1,745:
 
n = 255 : use the next byte + 1 times and repeat 255
 
n = 255 : use the next byte + 1 times and repeat 255
 
n>0 and n<255 : output n (literal)
 
n>0 and n<255 : output n (literal)
  +
  +
  +
<Calamus Raster Graphic> *.CRG
  +
  +
10 bytes file id [CALAMUSCRG]
  +
1 word version? [$03E8]
  +
1 word version? [$0002]
  +
1 long file size, minus 24
  +
1 word code for the page size? [$0080]
  +
1 long image width in pixels
  +
1 long image height in pixels
  +
1 long unknown [varies]
  +
1 byte unknown [$01]
  +
1 byte unknown [$00]
  +
1 long unknown [$FFFFFFFF]
  +
1 long size of compressed image data in bytes
  +
--------
  +
42 bytes total for header
  +
  +
?? monochrome image adata
  +
  +
RLE compression scheme: The compressed data consists of a code byte, followed by one or
  +
more data bytes, followed by another code byte, and so on.
  +
  +
To decompress: Code byte (N) Instructions
  +
N <= 127 Emit the next N+1 bytes literally.
  +
N >= 128 Emit the next byte N?127 times.
  +
  +
After decompression, pixels are in left-to-right, top-to-bottom order. The format is
  +
8 pixels per byte, most significant bit first, white is 0. Rows are padded to the next
  +
byte boundary.
   
   

Revision as of 12:33, 2 January 2017


Magazine References

  • ST Format, issue 31, p123.

Back to Graphics