Debian Codegraph @

userguide/infotopam.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Infotopam User Manual</title></head>
3 <body>
4 <h1>infotopam</h1>
5 Updated: 22 March 2024
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10 infotopam - convert Amiga .info icons to PAM
11
12 <h2 id="synopsis">SYNOPSIS</h2>
13
14 <p>
15 <b>infotopam</b>
16 [<b>-forcecolor</b>]
17 [<b>-numcolors</b> <i>numcolors</i>]
18 [<b>-selected</b>]
19 [<b>-verbose</b>]
20 [<i>index</i> <i>color</i> ...]
21 [<i>filename</i>]
22
23
24 <p>Minimum unique abbreviation of option is acceptable. You may use double
25 hyphens instead of single hyphen to denote options. You may use white space in
26 place of the equals sign to separate an option name from its value.
27
28 <h2 id="examples">EXAMPLES</h2>
29
30 <pre>
31 <code>
32 $ infotopam amiga.info &gt; amiga.first.pam
33 </code>
34 </pre>
35
36 <p>Use the <i>-selected</i> option to convert the &quot;selected&quot; version
37 of the icon rather than the regular version. Here <b>infotopam</b> reads from
38 Standard Input:
39
40 <pre>
41 <code>
42 infotopam -selected &lt; amiga.info &gt; amiga.second.pam
43 </code>
44 </pre>
45
46 <p>Use <i>-numcolors</i> to change the colors.
47
48 <pre>
49 <code>
50 infotopam -numcolors 2 0 green 3 rgb:FF/00/00 icon.info &gt; icon.pam
51 </code>
52 </pre>
53
54 <p>Since Amiga monitors do not use square pixels, some icons may appear
55 squished. Filtering the output through <b>pamscale</b> can fix this:
56
57 <pre>
58 <code>
59 $ infotopam squish.info | pamtopnm | pamscale -yscale 1.7 &gt; normal.pnm
60 </code>
61 </pre>
62
63
64 <h2 id="description">DESCRIPTION</h2>
65
66 <p>This program is part of <a href="index.html">Netpbm</a>.
67
68 <p><b>infotopam</b> converts an Amiga .info (icon) image to a PAM image.
69 <b>infotopam</b> reads a .info file from <i>filename</i>, or from Standard
70 Input if you do not specify a file name, and writes the converted PAM image to
71 Standard Output.
72
73 <p><b>infotopam</b> handles 1- and 2 bit-plane icons. If the .info icon has
74 only 1 bit-plane, <b>infotopam</b> generates a black and white PAM image;
75 otherwise it generates a color PAM image. In the latter case, you can choose
76 the colors or keep the original Amiga standard colors. You can
77 force <b>infotopam</b> to produce a color PAM with 1 bit-plane input with
78 a <b>-forcecolor</b> option.
79
80
81 <h2 id="options">OPTIONS</h2>
82
83 <p>In addition to the options common to all programs based on libnetpbm (most
84 notably <b>-quiet</b>, see <a href="index.html#commonoptions"> Common
85 Options</a>), <b>infotopam</b> recognizes the following command line options:
86
87 <dl>
88 <dt><b>-numcolors</b> <i>numcolors</i></dt>
89
90 <dd>This causes the program to change the colors in the conversion. A
91 2-bit-plane Amiga .icon image has four colors, numbered 0 through 3.
92 Those colors are as follows.
93
94 <dl>
95 <dt>0
96 <dd>Blue (00, 55, AA)
97 <dt>1
98 <dd>White (FF, FF, FF)
99 <dt>2
100 <dd>Black (00, 00, 20)
101 <dt>3
102 <dd>Orange (FF, 8A, 00)
103 </dl>
104
105 <p>To specify the changes, specify the number of colors you are changing
106 as the argument of <b>-numcolors</b> and for each color, specify a pair
107 of command line arguments, the first being the color index 0 through 3
108 and the second being the color to substitute. Specify the color
109 (<i>color</i>) as described for the
110 <a href="libnetpbm_image.html#colorname">argument of the
111 <b>pnm_parsecolor()</b> library routine</a>.
112
113 <p><strong>These arguments go before the input file name argument,
114 if any</strong>. This is an unusual syntax for a Netpbm program.
115
116 <dt><b>-selected</b></dt>
117
118 <dd>An Amiga .info image contains two versions of the icon: one for
119 regular display and one to display when the thing represented by
120 the icon is selected. By default, <b>infotopam</b> converts the
121 regular icon, but this option causes it to convert the selected icon
122 instead.
123
124 <dt><b>-forcecolor</b></dt>
125
126 <dd><p>This causes <b>infotopam</b> to convert 1 bit-plane icons to color
127 PAM images instead of black and white. The colors are the index 2
128 color for black and the index 1 color for white.
129
130 <dt><b>-verbose</b></dt>
131 <dd><p>This causes <b>infotopam</b> to issue informational messages about
132 the conversion process.
133
134 <p>This option was new in Netpbm 11.06 (March 2024).
135
136 </dl>
137
138 <p>All options can be abbreviated to their shortest unique prefix.
139
140 <h2 id="seealso">SEE ALSO</h2>
141
142 <p>
143 <a href="pam.html">pam</a>
144 <a href="pamtopnm.html">pamtopnm</a>
145 <a href="pamscale.html">pamscale</a>
146
147
148 <h2 id="notes">NOTES</h2>
149
150 <p>Thanks to the following people on comp.sys.amiga.programmer for tips
151 and pointers on decoding the info file format:
152
153 <ul>
154 <li>Ben Hutchings
155 <li>Thomas Richter
156 <li>Kjetil Svalastog Matheussen
157 <li>Anders Melchiorsen
158 <li>Dirk Stoecker
159 <li>Ronald V.D.
160 </ul>
161
162 <p>The format of the Amiga .info file is as follows:
163
164 <pre>
165 DiskObject header 78 bytes
166 Optional DrawerData header 56 bytes
167 First icon header 20 bytes
168 First icon data Varies
169 Second icon header 20 bytes
170 Second icon data Varies
171 </pre>
172
173 <p>The DiskObject header contains, among other things, the magic number
174 (0xE310), the object width and height (inside the embedded Gadget header),
175 and the version.
176
177 <p>Each icon header contains the icon width and height, which can be smaller
178 than the object width and height, and the number of bit-planes.
179
180 <p>The icon data has the following format:
181
182 <blockquote>
183 <p><i>BIT-PLANE</i> planes, each with <i>HEIGHT</i> rows of (<i>WIDTH</i>
184 +15) / 16 * 2 bytes length.
185 </blockquote>
186
187 <p>So if you have a 9x3x2 icon, the icon data will look like this:
188
189 <pre>
190 aaaa aaaa a000 0000
191 aaaa aaaa a000 0000
192 aaaa aaaa a000 0000
193 bbbb bbbb b000 0000
194 bbbb bbbb b000 0000
195 bbbb bbbb b000 0000
196 </pre>
197
198 <p>where <i>a</i> is a bit for the first bit-plane, <i>b</i> is a bit for the
199 second bit-plane, and <i>0</i> is padding. Thanks again to Ben Hutchings for
200 his very helpful post!
201
202 <h2 id="history">HISTORY</h2>
203
204 <p><b>infotopam</b> was new in Netpbm 10.22 (April 2004).
205
206 <h2 id="limitations">LIMITATIONS</h2>
207
208
209 <p><b>infotopam</b> currently only handles 1 and 2 bit-plane icons.
210
211 <p>There is no <b>pamtoinfo</b> command, since the .info files contain a lot
212 more than just icon data, and mapping the colors would be difficult.
213
214 <h2 id="author">AUTHOR</h2>
215
216 <p>Copyright (C) 2000, 2004 by Richard Griswold.
217
218 <hr />
219
220 <h2 id="index">Table Of Contents</h2>
221
222 <ul>
223 <li><a href="#synopsis">SYNOPSIS</a>
224 <li><a href="#examples">EXAMPLES</a>
225 <li><a href="#description">DESCRIPTION</a>
226 <li><a href="#options">OPTIONS</a>
227 <li><a href="#seealso">SEE ALSO</a>
228 <li><a href="#notes">NOTES</a>
229 <li><a href="#history">HISTORY</a>
230 <li><a href="#limitations">LIMITATIONS</a>
231 <li><a href="#author">AUTHOR</a>
232 </ul>
233
234 </body>
235 </html>