Icod


About
-----


icod is a utility to convert Windows-format icon files (.ico) to X-format
pixmaps (.xpm). I wrote it because none of the image viewing programs I have
(xv, ImageMagick etc) can handle .ico files.


It will extract correctly all icon images from each specified .ico file, and
write out each image to a filename consisting of the basename of the image, the
size, and the bit depth.



icod is released under the GNU General Public Licence (GPL), a copy of which
can be found at www.gnu.org/copyleft/gpl.html  


icod is (C) 1998 - 1999 Simon Drabble. I can be contacted at
madlather@syspac.com




Included in the tarball are several icons from the excellent GT Games
`Oddworld: Abe's Exoddus' game. Since these are freely downloadable from
the GT site I believe there is no restriction on distributing them.
If you know better, please let me know.



Note, I have no affiliation with GT, I have just included these icons for
testing purposes. Check out `Oddworld: Abe's Exoddus' though, it's great.


Installing
----------

Unzip the tarball with either of the following commands:


tar xvfz tarball                # If you have GNU tar.
gunzip -c tarball | tar xvf -   # If you have reg'lar tar.



Replace `tarball' with the name of the file you have downloaded.



Change into the icod directory, and type


  make 


This should compile the program. Installing the executable in your path is
left as an exercise for the reader.



If you encounter any errors when compiling, please email me and I'll see what
I can do. (See also Caveats & Bugs, below.)


Usage
-----

icod file1.ico [file2.ico ... filen.ico]


Use your favourite X image viewer to view the resulting pictures, or include
them in your X programs.



Caveats & Bugs
--------------


This program has only been tested on a 32-bit little-endian machine (Intel
Pentium), compiled with gcc 2.7.2.1 on Linux.
There may be issues when porting to a big-endian machine due to the storage
method of .ico files. If you manage to get it working on another architecture,
please let me know so that I may incorporate your changes into the code.



Bugs:

   o	Some random pixels appear to carry through on 24-bit icons. This seems
        to be something in the .ico file itself.

   o	The program may run out of colours when converting 24-bit images. This
        will only happen if there are more than 7921 colours in the icon. Since
        this has yet to be a problem for me I haven't bothered to fix it.


If you discover any bugs, or wish to comment on the program, or make an
enhancement, email me at madlather@syspac.com .




