IcoConvert

About
-----

icoconvert is a utility to convert Windows-format icon files (.ico) to PNG's. 
I wrote it because none of the image viewing programs I have
(xv, ImageMagick etc) can handle .ico files properly or at all, and icod
itself didn't handle transparencies and exported to XPM pixmaps.

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.

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

icoconvert is a modification on icod. I have tried and failed to contact the
author of icod. As such, and because my modifications to his code go beyond
the scope of his original program, I am releasing this as a new project.

icod is (C) 1998 - 1999 Simon Drabble. He can be contacted at
madlather@syspac.com. Please do not mail him with questions about
icoconvert, as he has nothing to do with it's development at all.

icoconvert is maintained by Chris Moates <six@mox.net> (c) 2001-2003. Please contact me
about any questions you have regarding this program.


Installing
----------

Before proceeding, make sure you have GD 2.x or newer on your system! If you
don't, you need to use icoconvert 1.x series, which supports GD 1.x.
Icoconvert 2.x will not work without GD 2.x!

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.

Included in the distribution is a binary compiled under Red Hat 7.1.
This may or may not work for your system. If not, delete it, and then:

Change into the icoconvert 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.)

I now include a static binary, since GD2.x is not available on many systems.
Feel free to use it as is.

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 32-bit little-endian machines (Intel
x86 Series), compiled with gcc 2.96 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. If
you wish to have this code working on a big-endian machine and do not wish
to make the code changes yourself, I could consider doing so but would
require access to said big-endian machines.

Bugs:

   o	Some random pixels appear to carry through on 24-bit icons. This seems
        to be something in the .ico file itself. (I have never seen this since
	the code changes I have made. If you find this, please, send me an
	example so that I can correct the bug.)

If you discover any bugs, or wish to comment on the program, or make an
enhancement, email me at six@mox.net.
