| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Infotopam User Manual" 1 "22 March 2024" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
infotopam - convert Amiga .info icons to PAM |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
.PP |
| 14 |
\fBinfotopam\fP |
| 15 |
[\fB-forcecolor\fP] |
| 16 |
[\fB-numcolors\fP \fInumcolors\fP] |
| 17 |
[\fB-selected\fP] |
| 18 |
[\fB-verbose\fP] |
| 19 |
[\fIindex\fP \fIcolor\fP ...] |
| 20 |
[\fIfilename\fP] |
| 21 |
.PP |
| 22 |
Minimum unique abbreviation of option is acceptable. You may use double |
| 23 |
hyphens instead of single hyphen to denote options. You may use white space in |
| 24 |
place of the equals sign to separate an option name from its value. |
| 25 |
|
| 26 |
.UN examples |
| 27 |
.SH EXAMPLES |
| 28 |
|
| 29 |
.nf |
| 30 |
\f(CW |
| 31 |
$ infotopam amiga.info > amiga.first.pam |
| 32 |
\fP |
| 33 |
|
| 34 |
.fi |
| 35 |
.PP |
| 36 |
Use the \fI-selected\fP option to convert the 'selected' version |
| 37 |
of the icon rather than the regular version. Here \fBinfotopam\fP reads from |
| 38 |
Standard Input: |
| 39 |
|
| 40 |
.nf |
| 41 |
\f(CW |
| 42 |
infotopam -selected < amiga.info > amiga.second.pam |
| 43 |
\fP |
| 44 |
|
| 45 |
.fi |
| 46 |
.PP |
| 47 |
Use \fI-numcolors\fP to change the colors. |
| 48 |
|
| 49 |
.nf |
| 50 |
\f(CW |
| 51 |
infotopam -numcolors 2 0 green 3 rgb:FF/00/00 icon.info > icon.pam |
| 52 |
\fP |
| 53 |
|
| 54 |
.fi |
| 55 |
.PP |
| 56 |
Since Amiga monitors do not use square pixels, some icons may appear |
| 57 |
squished. Filtering the output through \fBpamscale\fP can fix this: |
| 58 |
|
| 59 |
.nf |
| 60 |
\f(CW |
| 61 |
$ infotopam squish.info | pamtopnm | pamscale -yscale 1.7 > normal.pnm |
| 62 |
\fP |
| 63 |
|
| 64 |
.fi |
| 65 |
|
| 66 |
|
| 67 |
.UN description |
| 68 |
.SH DESCRIPTION |
| 69 |
.PP |
| 70 |
This program is part of |
| 71 |
.BR "Netpbm" (1)\c |
| 72 |
\&. |
| 73 |
.PP |
| 74 |
\fBinfotopam\fP converts an Amiga .info (icon) image to a PAM image. |
| 75 |
\fBinfotopam\fP reads a .info file from \fIfilename\fP, or from Standard |
| 76 |
Input if you do not specify a file name, and writes the converted PAM image to |
| 77 |
Standard Output. |
| 78 |
.PP |
| 79 |
\fBinfotopam\fP handles 1- and 2 bit-plane icons. If the .info icon has |
| 80 |
only 1 bit-plane, \fBinfotopam\fP generates a black and white PAM image; |
| 81 |
otherwise it generates a color PAM image. In the latter case, you can choose |
| 82 |
the colors or keep the original Amiga standard colors. You can |
| 83 |
force \fBinfotopam\fP to produce a color PAM with 1 bit-plane input with |
| 84 |
a \fB-forcecolor\fP option. |
| 85 |
|
| 86 |
|
| 87 |
.UN options |
| 88 |
.SH OPTIONS |
| 89 |
.PP |
| 90 |
In addition to the options common to all programs based on libnetpbm (most |
| 91 |
notably \fB-quiet\fP, see |
| 92 |
.UR index.html#commonoptions |
| 93 |
Common Options |
| 94 |
.UE |
| 95 |
\&), \fBinfotopam\fP recognizes the following command line options: |
| 96 |
|
| 97 |
|
| 98 |
.TP |
| 99 |
\fB-numcolors\fP \fInumcolors\fP |
| 100 |
This causes the program to change the colors in the conversion. A |
| 101 |
2-bit-plane Amiga .icon image has four colors, numbered 0 through 3. |
| 102 |
Those colors are as follows. |
| 103 |
|
| 104 |
|
| 105 |
.TP |
| 106 |
0 |
| 107 |
|
| 108 |
Blue (00, 55, AA) |
| 109 |
.TP |
| 110 |
1 |
| 111 |
|
| 112 |
White (FF, FF, FF) |
| 113 |
.TP |
| 114 |
2 |
| 115 |
|
| 116 |
Black (00, 00, 20) |
| 117 |
.TP |
| 118 |
3 |
| 119 |
|
| 120 |
Orange (FF, 8A, 00) |
| 121 |
|
| 122 |
.sp |
| 123 |
To specify the changes, specify the number of colors you are changing |
| 124 |
as the argument of \fB-numcolors\fP and for each color, specify a pair |
| 125 |
of command line arguments, the first being the color index 0 through 3 |
| 126 |
and the second being the color to substitute. Specify the color |
| 127 |
(\fIcolor\fP) as described for the |
| 128 |
|
| 129 |
.UR libnetpbm_image.html#colorname |
| 130 |
argument of the \fBpnm_parsecolor()\fP library routine |
| 131 |
.UE |
| 132 |
\&. |
| 133 |
.sp |
| 134 |
\fBThese arguments go before the input file name argument, |
| 135 |
if any\fP. This is an unusual syntax for a Netpbm program. |
| 136 |
|
| 137 |
.TP |
| 138 |
\fB-selected\fP |
| 139 |
|
| 140 |
|
| 141 |
An Amiga .info image contains two versions of the icon: one for |
| 142 |
regular display and one to display when the thing represented by |
| 143 |
the icon is selected. By default, \fBinfotopam\fP converts the |
| 144 |
regular icon, but this option causes it to convert the selected icon |
| 145 |
instead. |
| 146 |
|
| 147 |
.TP |
| 148 |
\fB-forcecolor\fP |
| 149 |
.sp |
| 150 |
This causes \fBinfotopam\fP to convert 1 bit-plane icons to color |
| 151 |
PAM images instead of black and white. The colors are the index 2 |
| 152 |
color for black and the index 1 color for white. |
| 153 |
|
| 154 |
.TP |
| 155 |
\fB-verbose\fP |
| 156 |
.sp |
| 157 |
This causes \fBinfotopam\fP to issue informational messages about |
| 158 |
the conversion process. |
| 159 |
.sp |
| 160 |
This option was new in Netpbm 11.06 (March 2024). |
| 161 |
|
| 162 |
|
| 163 |
.PP |
| 164 |
All options can be abbreviated to their shortest unique prefix. |
| 165 |
|
| 166 |
.UN seealso |
| 167 |
.SH SEE ALSO |
| 168 |
.PP |
| 169 |
.BR "pam" (1)\c |
| 170 |
\& |
| 171 |
.BR "pamtopnm" (1)\c |
| 172 |
\& |
| 173 |
.BR "pamscale" (1)\c |
| 174 |
\& |
| 175 |
|
| 176 |
|
| 177 |
.UN notes |
| 178 |
.SH NOTES |
| 179 |
.PP |
| 180 |
Thanks to the following people on comp.sys.amiga.programmer for tips |
| 181 |
and pointers on decoding the info file format: |
| 182 |
|
| 183 |
|
| 184 |
.IP \(bu |
| 185 |
Ben Hutchings |
| 186 |
.IP \(bu |
| 187 |
Thomas Richter |
| 188 |
.IP \(bu |
| 189 |
Kjetil Svalastog Matheussen |
| 190 |
.IP \(bu |
| 191 |
Anders Melchiorsen |
| 192 |
.IP \(bu |
| 193 |
Dirk Stoecker |
| 194 |
.IP \(bu |
| 195 |
Ronald V.D. |
| 196 |
|
| 197 |
.PP |
| 198 |
The format of the Amiga .info file is as follows: |
| 199 |
|
| 200 |
.nf |
| 201 |
DiskObject header 78 bytes |
| 202 |
Optional DrawerData header 56 bytes |
| 203 |
First icon header 20 bytes |
| 204 |
First icon data Varies |
| 205 |
Second icon header 20 bytes |
| 206 |
Second icon data Varies |
| 207 |
|
| 208 |
.fi |
| 209 |
.PP |
| 210 |
The DiskObject header contains, among other things, the magic number |
| 211 |
(0xE310), the object width and height (inside the embedded Gadget header), |
| 212 |
and the version. |
| 213 |
.PP |
| 214 |
Each icon header contains the icon width and height, which can be smaller |
| 215 |
than the object width and height, and the number of bit-planes. |
| 216 |
.PP |
| 217 |
The icon data has the following format: |
| 218 |
|
| 219 |
.RS |
| 220 |
|
| 221 |
.PP |
| 222 |
\fIBIT-PLANE\fP planes, each with \fIHEIGHT\fP rows of (\fIWIDTH\fP |
| 223 |
+15) / 16 * 2 bytes length. |
| 224 |
.RE |
| 225 |
.PP |
| 226 |
So if you have a 9x3x2 icon, the icon data will look like this: |
| 227 |
|
| 228 |
.nf |
| 229 |
aaaa aaaa a000 0000 |
| 230 |
aaaa aaaa a000 0000 |
| 231 |
aaaa aaaa a000 0000 |
| 232 |
bbbb bbbb b000 0000 |
| 233 |
bbbb bbbb b000 0000 |
| 234 |
bbbb bbbb b000 0000 |
| 235 |
|
| 236 |
.fi |
| 237 |
.PP |
| 238 |
where \fIa\fP is a bit for the first bit-plane, \fIb\fP is a bit for the |
| 239 |
second bit-plane, and \fI0\fP is padding. Thanks again to Ben Hutchings for |
| 240 |
his very helpful post! |
| 241 |
|
| 242 |
.UN history |
| 243 |
.SH HISTORY |
| 244 |
.PP |
| 245 |
\fBinfotopam\fP was new in Netpbm 10.22 (April 2004). |
| 246 |
|
| 247 |
.UN limitations |
| 248 |
.SH LIMITATIONS |
| 249 |
.PP |
| 250 |
\fBinfotopam\fP currently only handles 1 and 2 bit-plane icons. |
| 251 |
.PP |
| 252 |
There is no \fBpamtoinfo\fP command, since the .info files contain a lot |
| 253 |
more than just icon data, and mapping the colors would be difficult. |
| 254 |
|
| 255 |
.UN author |
| 256 |
.SH AUTHOR |
| 257 |
.PP |
| 258 |
Copyright (C) 2000, 2004 by Richard Griswold. |
| 259 |
.SH DOCUMENT SOURCE |
| 260 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 261 |
source. The master documentation is at |
| 262 |
.IP |
| 263 |
.B http://netpbm.sourceforge.net/doc/infotopam.html |
| 264 |
.PP |