Calamus Raster Graphic

Calamus Raster Graphic (CRG) is a graphics format associated with the Calamus desktop publishing software by invers Software. At least some CRG images are compressed using a simple run-length encoding scheme.

Refer to Calamus for more information about the software, and related formats.

Identification
CRG files apparently begin with the ASCII signature "".

Format details
''[Partial decoding, based on analysis of a small number of CRG files. This may be incorrect.]''

Multi-byte integers are big-endian.

RLE compression
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:

(This is essentially the same algorithm as in TGA, but byte-oriented instead of pixel-oriented.)

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.

Software

 * Konvertor
 * XnView (Does not seem to work perfectly.)
 * supports some CRG files
 * RECOIL

Sample files

 * http://cd.textfiles.com/suzybatari2/new_file/extras/dtp/calamus/cal_pics/
 * https://telparia.com/fileFormatSamples/image/crg/