1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
\
.\" 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 "Ppmtoilbm User Manual" 1 "15 January 2022" "netpbm documentation"
.SH NAME
ppmtoilbm - convert a PPM image into an ILBM file
.UN synopsis
.SH SYNOPSIS
\fBppmtoilbm\fP
[\fB-maxplanes\fP|\fB-mp\fP \fIN\fP]
[\fB-fixplanes\fP|\fB-fp\fP \fIN\fP]
[\fB-ham6\fP|\fB-ham8\fP]
[{\fB-dcbits\fP|\fB-dcplanes\fP} \fIr\fP \fIg\fP \fIb\fP]
[
\fB-normal\fP|\fB-hamif\fP|\fB-hamforce\fP|\fB-24if\fP|\fB-24force\fP|
\fB-dcif\fP|\fB-dcforce\fP|\fB-cmaponly\fP
]
[\fB-ecs\fP|\fB-aga\fP]
[\fB-compress\fP|\fB-nocompress\fP]
[\fB-cmethod\fP \fItype\fP]
[\fB-map\fP \fIppmfile\fP]
[\fBppmfile\fP]
.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBppmtoilbm\fP reads a PPM image as input. Produces an ILBM file
as output. \fBppmtoilbm\fP understands the following ILBM types:
.IP \(bu
Normal ILBMs with 1-16 planes
.IP \(bu
Amiga HAM with 3-16 planes
.IP \(bu
24 bit
.IP \(bu
Color map (BMHD + CMAP chunk only, nPlanes = 0)
.IP \(bu
Unofficial direct color. 1-16 planes for each color component.
.PP
Chunks written: BMHD, CMAP, CAMG (only for HAM), BODY (not for
colormap files) unofficial DCOL chunk for direct color ILBM.
.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
\&), \fBppmtoilbm\fP recognizes the following
command line options:
.PP
Options marked with (*) can be prefixed with a "no",
e.g. "-nohamif". All options can be abbreviated to their
shortest unique prefix.
.TP
\fB-maxplanes\fP | \fB-mp\fP \fIn\fP
(default 5, minimum 1, maximum 16) Maximum planes to write in a
normal ILBM. If the image does not fit into <n> planes,
ppmtoilbm writes a HAM file (if -hamif is used), a 24bit file (if
-24if is used) or a direct color file (if -dcif is used) or aborts
with an error.
.TP
\fB-fixplanes\fP | \fB-fp\fP \fIb\fP
(min 1, max 16) If a normal ILBM is written, it will have exactly
<n> planes.
.TP
\fB-hambits\fP | \fB-hamplanes\fP \fIn\fP
(default 6, min 3, max 16) Select number of planes for HAM
picture. The current Amiga hardware understands 6 and 8 planes, so for
now you should only use this values.
.TP
\fB-normal\fP
Turns off -hamif/-24if/-dcif, -hamforce/-24force/-dcforce and
-cmaponly. Also sets compression type to byterun1.
.sp
This is the default.
.TP
\fB-hamif\fP (*)
.TP
\fB-24if\fP (*)
.TP
\fB-dcif\fP (*)
Write a HAM/24bit/direct color file if the image does not fit into
<maxplanes> planes.
.TP
\fB-hamforce\fP (*)
.TP
\fB-24force\fP (*)
.TP
\fB-dcforce\fP (*)
Write a HAM/24bit/direct color file.
.TP
\fB-dcbits\fP \fIr\fP \fIg\fP \fIb\fP
.TP
\fB-dcplanes\fP \fIr\fP \fIg\fP \fIb\fP
(default 5, min 1, max 16). Select number of bits for red, green
and blue in a direct color ILBM.
.TP
\fB-ecs\fP
Shortcut for: -hamplanes 6 -maxplanes 5
.sp
This is the default.
.TP
\fB-aga\fP
Shortcut for: \fB-hamplanes 8 -maxplanes 8\fP
.TP
\fB-ham6\fP
Shortcut for: \fB-hamplanes 6 -hamforce\fP
.TP
\fB-ham8\fP
Shortcut for: \fB-hamplanes 8 -hamforce\fP
.TP
\fB-compress\fP (*)
This is the default.
Compress the BODY chunk. The default compression method is
byterun1. Compression requires building the ILBM image in memory;
turning compression off allows stream-writing of the image, but the
resulting file will usually be 30% to 50% larger. Another alternative
is the -savemem option, this will keep memory requirements for
compression at a minimum, but is very slow.
.TP
\fB-cmethod\fP \fBnone\fP|\fBbyterun1\fP
This option does the same thing as \fB-compress\fP.
.TP
\fB-map\fP \fIppmfile\fP
Write a normal ILBM using the colors in <ppmfile> as the
colormap. The colormap file also determines the number of planes;
\fB-maxplanes\fP and \fB-fixplanes\fP are ignored.
.TP
\fB-cmaponly\fP
Write a colormap file: only BMHD and CMAP chunks, no BODY chunk,
nPlanes = 0.
.TP
\fB-savemem\fP
See the \fB-compress\fP option.
.UN limitations
.SH LIMITATIONS
.PP
HAM pictures will always get a grayscale colormap; a real color
selection algorithm might give better results. On the other hand,
this allows row-by-row operation on HAM images, and all HAM images of
the same depth (no. of planes) share a common colormap, which is
useful for building HAM animations.
.UN references
.SH REFERENCES
Amiga ROM Kernel Reference Manual - Devices (3rd Ed.)
Addison Wesley, ISBN 0-201-56775-X
.UN seealso
.SH SEE ALSO
.BR "ppm" (1)\c
\&,
.BR "ilbmtoppm" (1)\c
\&
.UN history
.SH HISTORY
.PP
For about a year in 1993-1994, there was a \fB-savemem\fP option.
.PP
There used to be a \fB-floyd\fP (aka \fB-fs\fP) option that was supposed
to cause images to be dithered so that a larger number of colors in the PPM
input could be represented in a smaller number of colors in the ILBM output.
But it was never documented. Furthermore, developers discovered in January
2022 that the code for this was nonfunctional because of defects, and had
been for a very long time and maybe always. Finally,, this functions is not
appropriate in the Netpbm philosophy, because dithering should be done by a
separate dithering program, not a format conversion program. Indeed,
the programs \fBppmdither\fP, \fBpnmquant\fP, and \fBpnmremap\fP can do
this.
.PP
Therefore, since Netpbm 10.98 (March 2022), the dithering code has not been
in the program and any attempt to use the options fails with a simple
invalid option message. But the \fB-nofloyd\fP and \fB-nofs\fP options
remain, doing nothing as they were designed to do, and still not documented.
This is just in case something uses those options, since the cost of
maintaining them is so small.
.UN authors
.SH AUTHORS
.PP
Copyright (C) 1989 by Jef Poskanzer.
.PP
Modified October 1993 by Ingo Wilken (\fIIngo.Wilken@informatik.uni-oldenburg.de\fP)
.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/ppmtoilbm.html
.PP
|