infotopam [-forcecolor] [-numcolors numcolors] [-selected] [-verbose] [index color ...] [filename]
Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value.
$ infotopam amiga.info > amiga.first.pam
Use the -selected option to convert the "selected" version of the icon rather than the regular version. Here infotopam reads from Standard Input:
infotopam -selected < amiga.info > amiga.second.pam
Use -numcolors to change the colors.
infotopam -numcolors 2 0 green 3 rgb:FF/00/00 icon.info > icon.pam
Since Amiga monitors do not use square pixels, some icons may appear squished. Filtering the output through pamscale can fix this:
$ infotopam squish.info | pamtopnm | pamscale -yscale 1.7 > normal.pnm
This program is part of Netpbm.
infotopam converts an Amiga .info (icon) image to a PAM image. infotopam reads a .info file from filename, or from Standard Input if you do not specify a file name, and writes the converted PAM image to Standard Output.
infotopam handles 1- and 2 bit-plane icons. If the .info icon has only 1 bit-plane, infotopam generates a black and white PAM image; otherwise it generates a color PAM image. In the latter case, you can choose the colors or keep the original Amiga standard colors. You can force infotopam to produce a color PAM with 1 bit-plane input with a -forcecolor option.
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), infotopam recognizes the following command line options:
To specify the changes, specify the number of colors you are changing as the argument of -numcolors and for each color, specify a pair of command line arguments, the first being the color index 0 through 3 and the second being the color to substitute. Specify the color (color) as described for the argument of the pnm_parsecolor() library routine.
These arguments go before the input file name argument, if any. This is an unusual syntax for a Netpbm program.
This causes infotopam to convert 1 bit-plane icons to color PAM images instead of black and white. The colors are the index 2 color for black and the index 1 color for white.
This causes infotopam to issue informational messages about the conversion process.
This option was new in Netpbm 11.06 (March 2024).
All options can be abbreviated to their shortest unique prefix.
Thanks to the following people on comp.sys.amiga.programmer for tips and pointers on decoding the info file format:
The format of the Amiga .info file is as follows:
DiskObject header 78 bytes Optional DrawerData header 56 bytes First icon header 20 bytes First icon data Varies Second icon header 20 bytes Second icon data Varies
The DiskObject header contains, among other things, the magic number (0xE310), the object width and height (inside the embedded Gadget header), and the version.
Each icon header contains the icon width and height, which can be smaller than the object width and height, and the number of bit-planes.
The icon data has the following format:
BIT-PLANE planes, each with HEIGHT rows of (WIDTH +15) / 16 * 2 bytes length.
So if you have a 9x3x2 icon, the icon data will look like this:
aaaa aaaa a000 0000 aaaa aaaa a000 0000 aaaa aaaa a000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000
where a is a bit for the first bit-plane, b is a bit for the second bit-plane, and 0 is padding. Thanks again to Ben Hutchings for his very helpful post!
infotopam was new in Netpbm 10.22 (April 2004).
infotopam currently only handles 1 and 2 bit-plane icons.
There is no pamtoinfo command, since the .info files contain a lot more than just icon data, and mapping the colors would be difficult.
Copyright (C) 2000, 2004 by Richard Griswold.