1ICOTOOL(1)                  General Commands Manual                 ICOTOOL(1)
2
3
4

NAME

6       icotool - Convert and create Win32 icon and cursor files
7

SYNOPSIS

9       icotool [OPTION]... [FILE]...
10

DESCRIPTION

12       This manual page document describes the icotool command.
13
14       The  icotool program converts and creates icon (.ico) and cursor (.cur)
15       files. At the moment icons can only be created from and extracted  into
16       PNG files. This is done using libpng.
17
18       Icon and cursor files are used mainly on the Microsoft Windows(R) plat‐
19       form. Each icons or cursors file may contain multiple images of various
20       resolutions  and  with  different number of colors. Cursor files differ
21       from icon files in that they also contain information about the hotspot
22       of each image.
23
24       Recent  versions  of  Microsoft's Internet Explorer use icons for small
25       site logotypes. The browser fetches a file called  favicon.ico  from  a
26       web  site,  and  uses  the images in this file to represent the site in
27       menus and site lists. (This file is  placed  in  the  web  site's  root
28       directory,  like any other file.) Browsers like Galeon have copied this
29       behaviour and now also fetches .ico files and use them for  site  logo‐
30       types.
31
32       As  each  icon or cursor file may contains multiple images of different
33       dimensions and depth, a conversion may result  in  multiple  PNG  files
34       being  created.  Correspondingly,  multiple  PNG files can be specified
35       when creating an icon/cursor file.
36

OPTIONS

38       These programs follow the usual GNU  command  line  syntax,  with  long
39       options starting with two dashes (`-').
40
41       -x, --extract
42              This option tells icotool that images from all icon/cursor files
43              given on the command line are to be  extracted.  Filter  options
44              (see  below)  can  be  used  to control what images that will be
45              extracted.
46
47       -l, --list
48              This options tells icotool that images in all given  icon/cursor
49              files  are  to  be  listed.  The output will look something like
50              this:
51
52                --icon --index=1 --width=16 --height=16  --bit-depth=4  --pal‐
53              ette-size=16
54                --icon  --index=2  --width=32 --height=32 --bit-depth=8 --pal‐
55              ette-size=256
56
57       -c, --create
58              This options tells icotool to create an icon/cursor  file  using
59              all  the  PNG files given on the command line, in the order they
60              were specified.  The number  of  bits  per  pixel  used  in  the
61              icon/cursor file will depend on the number of colors used in the
62              PNG file. (If the PNG image has an indexed palette,  it  doesn't
63              necessarily  mean that the same palette will be used in the cre‐
64              ated icon/cursor file.)
65
66       -i, --index=N
67              When listing or extracing files, this options  tell  icotool  to
68              list  or  extract  only  the  N'th image in each file. The first
69              image has index 1.
70
71              This option has no effect in create  mode.   -w,  --width=PIXELS
72              Similar to --index, but this option allows the image width to be
73              matched instead. This option has no effect in create mode.
74
75       -h, --height=PIXELS
76              Similar to --index, but this option allows the image  height  to
77              be matched instead. This option has no effect in create mode.
78
79       -b, --bit-depth=COUNT
80              Similar  to  --index,  but this option allows the number of bits
81              per pixel in the image to be matched instead. Valid  values  are
82              1, 2, 4, 8, 16, 24 and 32.
83
84              In  create mode, this option will allow you to specify a minimum
85              bit depth for images in the icon file.
86
87       -p, --palette-size=PIXELS
88              Similar to --index, but this option allows the number of  colors
89              in the image palette to be matched instead. Images with 24 or 32
90              bits in icon/cursor files do not have a palette, and will there‐
91              fore have a palette size equal to 0.
92
93              This option has no effect in create mode.
94
95       -X, --hotspot-x=COORD
96              Similar  to  --index, but this option allows the x-coordinate of
97              the hotspot to be matched. This option only has effect on cursor
98              files.
99
100              In  create mode, this can be used to specify the hotspot x-coor‐
101              dinate.
102
103       -Y, --hotspot-y=COORD
104              Similar to --index, but this option allows the  y-coordinate  of
105              the hotspot to be matched. This option only has effect on cursor
106              files.
107
108              In create mode, this can be used to specify the hotspot  y-coor‐
109              dinate.
110
111       --icon This  option  specifies that only icon files are to be listed or
112              extracted.  In create mode, this option can be used  to  specify
113              that  an  icon  (instead of a cursor) is to be created. (This is
114              default in create mode.)
115
116       --cursor
117              This option specifies that only cursor files are to be listed or
118              extracted.   In  create mode, this can be used to specify that a
119              cursor (instead of an icon) is to be created.
120
121       -t, --alpha-threshold=LEVEL
122              Specifies the maximal alpha level in the PNG image for  portions
123              which  shall become transparent in the icon created. The default
124              value is 127.  This is only used when creating icon files.
125
126       -o, --output=PATH
127              In  extract  mode,  this  option  specifies  a  directory  where
128              extracted files are to be created. If PATH does not exist, it is
129              assumed that it refers to a non-existing file instead. The first
130              image matched will be extracted to the file with that name.
131
132              In  create  mode,  this  option specified the name of the output
133              file.  The default is to write the binary data to  standard  out
134              (which icotool will refuse if standard out is the terminal).
135
136              If PATH is `-', then all output will be printed to standard out.
137
138              This option has no effect in list mode.
139
140       --help Show summary of options.
141
142       --version
143              Output version information and exit.
144

EXAMPLES

146       List all images in the file `demo.ico':
147         $ icotool -l demo.ico
148         --icon  --index=1  --width=16  --height=16  --bit-depth=4  --palette-
149       size=16
150         --icon  --index=2  --width=32  --height=32  --bit-depth=4  --palette-
151       size=16
152         --icon  --index=3  --width=48  --height=48  --bit-depth=4  --palette-
153       size=16
154         --icon  --index=4  --width=16  --height=16  --bit-depth=8  --palette-
155       size=256
156         --icon  --index=5  --width=32  --height=32  --bit-depth=8  --palette-
157       size=256
158         --icon  --index=6  --width=48  --height=48  --bit-depth=8  --palette-
159       size=256
160
161       List only 16-color images in `demo.ico':
162         $ icotool -l --palette-size=16 demo.ico
163         --icon  --index=1  --width=16  --height=16  --bit-depth=4  --palette-
164       size=16
165         --icon  --index=2  --width=32  --height=32  --bit-depth=4  --palette-
166       size=16
167         --icon  --index=3  --width=48  --height=48  --bit-depth=4  --palette-
168       size=16
169
170       Extract all images to current directory, naming the  destination  files
171       `demo.ico_I_WxHxD.xpm':
172         $ icotool -x -o . demo.ico
173         $ ls *.png
174         demo_1_16x16x4.png  demo_3_48x48x4.png  demo_5_32x32x8.png
175         demo_2_32x32x4.png  demo_4_16x16x8.png  demo_6_48x48x8.png
176
177       Extract  all  256-color  icon  images  in all .ico files in the current
178       directory, placing the extracted images in `img/'
179         $ icotool -x -o img/ -p 256 *.ico
180
181       Create an icon named `favicon.ico' with two images:
182         $ icotool -c -o favicon.ico mysite_32x32.png mysite_64x64.png
183

AUTHOR

185       The icoutils were written by Oskar Liljeblad <oskar@osk.mine.nu>.
186
188       Copyright © 1998 Oskar Liljeblad
189
190       This is free software; see the source for copying conditions.  There is
191       NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
192       PURPOSE.
193

TRADEMARKS

195       Windows is a registered  trademark  of  Microsoft  Corporation  in  the
196       United States and other countries.
197
198
199
200icotool (icoutils)              April 18, 2005                      ICOTOOL(1)
Impressum