Usage:
icotool [OPTIONS]... [FILE]...
The icotool program reads .ICO or .CUR files, and lists or extracts the images they contain. At this time, the only supported image format is XPM. icotool does not require any libraries to make XPM files.
Filters, specified as command line options, control what images to extract.
Extract images in file. (By default, images will be extracted to standard out if --output was not specified.)
Output list of images in file (default).
Create icon files from specified images (not yet implemented).
Index of the image to perform operation on.
Match images of this specific width only.
Match images of this specific height only.
Match images of this number of colors only.
If matching cursor, match only cursor where the hotspot X-coordinate is this value.
If matching cursor, match only cursor where the hotspot Y-coordinate is this value.
Match icon files only.
Match cursor files only.
Perform operation on all images (default)
Speicifies where to place extracted images. If PATH does not refer to an existing directory, and does not end with a slash ('/'), all output will be written to the file denoted by PATH. (This means that if you extract multiple images, PATH will contain the last images only.)
Similar to --output, but here BASE is the basename of extracted files. For example, if BASE is "tmp_", the extracted image files would be named "tmp_C_WxH.FMT" (where C is number of colors, W width and H height).
This option cannot be combined with the --output option.
Extraction format; "xpm", or "ppm". At this time, only the "xpm" format is supported though.
Controls what will be extracted of each image; "image" for image data only, "mask" for only mask, or "both" for both (default).
Explain what is being done. The verbose option may be specified more than once, like "-vv", to make icotool even more verbose.
Display a help message and exit.
Output version information and exit.
List all images in file "demo.ico":
$ icotool -l demo.ico
--icon --index=0 --width=32 --height=32 --colors=16
--icon --index=1 --width=16 --height=16 --colors=16
--icon --index=2 --width=48 --height=48 --colors=16
--icon --index=3 --width=16 --height=16 --colors=256
--icon --index=4 --width=32 --height=32 --colors=256
--icon --index=5 --width=48 --height=48 --colors=256
$
List only 16-color images in "demo.ico":
$ icotool -l --colors=16 demo.ico
--icon --index=0 --width=32 --height=32 --colors=16
--icon --index=1 --width=16 --height=16 --colors=16
--icon --index=2 --width=48 --height=48 --colors=16
$
Extract all images to current directory, naming the destination files "demo.ico_C_WxH.xpm":
$ icotool -x --output=. demo.ico
$ ls *.xpm
demo.ico_16_16x16.xpm demo.ico_16_48x48.xpm demo.ico_256_32x32.xpm
demo.ico_16_32x32.xpm demo.ico_256_16x16.xpm demo.ico_256_48x48.xpm
$
Extract all 256-color icon images in all .ico files in the current dir, placing the extracted images in "img/"
$ icotool -x -oimg/ -C256 *.ico
$