giftoims.icn: Program to convert GIF files to image strings

June 10, 2001; Ralph E. Griswold
Requires: Version 9 graphics
This file is in the public domain.
This program converts GIF images whose names are given on the command
line to image strings as used by DrawImage().

The image strings are written to files with the basenames of the GIF
files and the suffix "ims" or "iml" depending on the output option.

The following options are supported:

     -l      write Icon literal instead of plain string; suffix is
               .iml (default .ims).
     -i i    make lines of literals at most i characters long
     -p s    palette to use; default c1.

For -l, the length refers to the number of characters represented.  If
they require escapes, thea actual line length will be longer.  This is
to prevent errors from trying to continue a string literal in the
middle of an escape sequence.  In addition, three blanks are prepended
to each line and the characters # and $ are escaped to prevent then
from being misinterpreted by Icon's translator.

.iml files are suitable for inclusion in program text, either
directly or by $include.

.ims files are suitable for reading.

Source code | Program Library Page | Icon Home Page