\ .\" This man page was generated by the Netpbm tool 'makeman' from HTML source. .\" Do not hand-hack it! If you have bug fixes or improvements, please find .\" the corresponding HTML page on the Netpbm website, generate a patch .\" against that, and send it to the Netpbm maintainer. .TH "Infotopam User Manual" 1 "22 March 2024" "netpbm documentation" .SH NAME infotopam - convert Amiga .info icons to PAM .UN synopsis .SH SYNOPSIS .PP \fBinfotopam\fP [\fB-forcecolor\fP] [\fB-numcolors\fP \fInumcolors\fP] [\fB-selected\fP] [\fB-verbose\fP] [\fIindex\fP \fIcolor\fP ...] [\fIfilename\fP] .PP 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. .UN examples .SH EXAMPLES .nf \f(CW $ infotopam amiga.info > amiga.first.pam \fP .fi .PP Use the \fI-selected\fP option to convert the 'selected' version of the icon rather than the regular version. Here \fBinfotopam\fP reads from Standard Input: .nf \f(CW infotopam -selected < amiga.info > amiga.second.pam \fP .fi .PP Use \fI-numcolors\fP to change the colors. .nf \f(CW infotopam -numcolors 2 0 green 3 rgb:FF/00/00 icon.info > icon.pam \fP .fi .PP Since Amiga monitors do not use square pixels, some icons may appear squished. Filtering the output through \fBpamscale\fP can fix this: .nf \f(CW $ infotopam squish.info | pamtopnm | pamscale -yscale 1.7 > normal.pnm \fP .fi .UN description .SH DESCRIPTION .PP This program is part of .BR "Netpbm" (1)\c \&. .PP \fBinfotopam\fP converts an Amiga .info (icon) image to a PAM image. \fBinfotopam\fP reads a .info file from \fIfilename\fP, or from Standard Input if you do not specify a file name, and writes the converted PAM image to Standard Output. .PP \fBinfotopam\fP handles 1- and 2 bit-plane icons. If the .info icon has only 1 bit-plane, \fBinfotopam\fP 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 \fBinfotopam\fP to produce a color PAM with 1 bit-plane input with a \fB-forcecolor\fP option. .UN options .SH OPTIONS .PP In addition to the options common to all programs based on libnetpbm (most notably \fB-quiet\fP, see .UR index.html#commonoptions Common Options .UE \&), \fBinfotopam\fP recognizes the following command line options: .TP \fB-numcolors\fP \fInumcolors\fP This causes the program to change the colors in the conversion. A 2-bit-plane Amiga .icon image has four colors, numbered 0 through 3. Those colors are as follows. .TP 0 Blue (00, 55, AA) .TP 1 White (FF, FF, FF) .TP 2 Black (00, 00, 20) .TP 3 Orange (FF, 8A, 00) .sp To specify the changes, specify the number of colors you are changing as the argument of \fB-numcolors\fP 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 (\fIcolor\fP) as described for the .UR libnetpbm_image.html#colorname argument of the \fBpnm_parsecolor()\fP library routine .UE \&. .sp \fBThese arguments go before the input file name argument, if any\fP. This is an unusual syntax for a Netpbm program. .TP \fB-selected\fP An Amiga .info image contains two versions of the icon: one for regular display and one to display when the thing represented by the icon is selected. By default, \fBinfotopam\fP converts the regular icon, but this option causes it to convert the selected icon instead. .TP \fB-forcecolor\fP .sp This causes \fBinfotopam\fP 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. .TP \fB-verbose\fP .sp This causes \fBinfotopam\fP to issue informational messages about the conversion process. .sp This option was new in Netpbm 11.06 (March 2024). .PP All options can be abbreviated to their shortest unique prefix. .UN seealso .SH SEE ALSO .PP .BR "pam" (1)\c \& .BR "pamtopnm" (1)\c \& .BR "pamscale" (1)\c \& .UN notes .SH NOTES .PP Thanks to the following people on comp.sys.amiga.programmer for tips and pointers on decoding the info file format: .IP \(bu Ben Hutchings .IP \(bu Thomas Richter .IP \(bu Kjetil Svalastog Matheussen .IP \(bu Anders Melchiorsen .IP \(bu Dirk Stoecker .IP \(bu Ronald V.D. .PP The format of the Amiga .info file is as follows: .nf 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 .fi .PP The DiskObject header contains, among other things, the magic number (0xE310), the object width and height (inside the embedded Gadget header), and the version. .PP 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. .PP The icon data has the following format: .RS .PP \fIBIT-PLANE\fP planes, each with \fIHEIGHT\fP rows of (\fIWIDTH\fP +15) / 16 * 2 bytes length. .RE .PP So if you have a 9x3x2 icon, the icon data will look like this: .nf aaaa aaaa a000 0000 aaaa aaaa a000 0000 aaaa aaaa a000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000 bbbb bbbb b000 0000 .fi .PP where \fIa\fP is a bit for the first bit-plane, \fIb\fP is a bit for the second bit-plane, and \fI0\fP is padding. Thanks again to Ben Hutchings for his very helpful post! .UN history .SH HISTORY .PP \fBinfotopam\fP was new in Netpbm 10.22 (April 2004). .UN limitations .SH LIMITATIONS .PP \fBinfotopam\fP currently only handles 1 and 2 bit-plane icons. .PP There is no \fBpamtoinfo\fP command, since the .info files contain a lot more than just icon data, and mapping the colors would be difficult. .UN author .SH AUTHOR .PP Copyright (C) 2000, 2004 by Richard Griswold. .SH DOCUMENT SOURCE This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at .IP .B http://netpbm.sourceforge.net/doc/infotopam.html .PP