ICOTOOL(1) | General Commands Manual | ICOTOOL(1) |
icotool - Convert and create Win32 icon and cursor files
icotool [OPTION]... [FILE]...
This manual page document describes the icotool command.
The icotool program converts and creates icon (.ico) and cursor (.cur) files. At the moment icons can only be created from and extracted into PNG files. This is done using libpng.
Icon and cursor files are used mainly on the Microsoft Windows(R) platform. Each icons or cursors file may contain multiple images of various resolutions and with different number of colors. Cursor files differ from icon files in that they also contain information about the hotspot of each image.
Recent versions of Microsoft's Internet Explorer use icons for small site logotypes. The browser fetches a file called favicon.ico from a web site, and uses the images in this file to represent the site in menus and site lists. (This file is placed in the web site's root directory, like any other file.) Browsers like Galeon have copied this behaviour and now also fetches .ico files and use them for site logotypes.
As each icon or cursor file may contains multiple images of different dimensions and depth, a conversion may result in multiple PNG files being created. Correspondingly, multiple PNG files can be specified when creating an icon/cursor file.
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-').
--icon --index=1 --width=16 --height=16 --bit-depth=4 --palette-size=16
--icon --index=2 --width=32 --height=32 --bit-depth=8
--palette-size=256
This option has no effect in create mode.
In create mode, this option will allow you to specify a minimum bit depth for images in the icon file. If you provide the option once it will apply to all input files. If you specify it multiple times, it will apply to all input files following a particular option; in that case you should specify a bit depth for all images.
This option has no effect in create mode.
In create mode, this can be used to specify the hotspot x-coordinate. If you provide the option once it will apply to all input files. If you specify it multiple times, it will apply to all input files following a particular option; in that case you should specify a hotspot coordinate for all images.
In create mode, this can be used to specify the hotspot y-coordinate. If you provide the option once it will apply to all input files. If you specify it multiple times, it will apply to all input files following a particular option; in that case you should specify a hotspot coordinate for all images.
In create mode, this option specified the name of the output file. The default is to write the binary data to standard out (which icotool will refuse if standard out is the terminal).
If PATH is `-', then all output will be printed to standard out.
This option has no effect in list mode.
List all images in the file `demo.ico':
$ icotool -l demo.ico
--icon --index=1 --width=16 --height=16 --bit-depth=4 --palette-size=16
--icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16
--icon --index=3 --width=48 --height=48 --bit-depth=4 --palette-size=16
--icon --index=4 --width=16 --height=16 --bit-depth=8 --palette-size=256
--icon --index=5 --width=32 --height=32 --bit-depth=8 --palette-size=256
--icon --index=6 --width=48 --height=48 --bit-depth=8 --palette-size=256
List only 16-color images in `demo.ico':
$ icotool -l --palette-size=16 demo.ico
--icon --index=1 --width=16 --height=16 --bit-depth=4 --palette-size=16
--icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16
--icon --index=3 --width=48 --height=48 --bit-depth=4 --palette-size=16
Extract all images to current directory, naming the destination
files `demo.ico_I_WxHxD.xpm':
$ icotool -x -o . demo.ico
$ ls *.png
demo_1_16x16x4.png demo_3_48x48x4.png demo_5_32x32x8.png
demo_2_32x32x4.png demo_4_16x16x8.png demo_6_48x48x8.png
Extract all 256-color icon images in all .ico files in the current
directory, placing the extracted images in `img/'
$ icotool -x -o img/ -p 256 *.ico
Create an icon named `favicon.ico' with two images:
$ icotool -c -o favicon.ico mysite_32x32.png mysite_64x64.png
The icoutils were written by Oskar Liljeblad <oskar@osk.mine.nu>.
Copyright © 1998 Oskar Liljeblad
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Windows is a registered trademark of Microsoft Corporation in the United States and other countries.
April 18, 2005 | icotool (icoutils) |