1Pnmtopalm User Manual(0)                              Pnmtopalm User Manual(0)
2
3
4

NAME

6       pnmtopalm - convert a PNM image to a Palm Bitmap
7
8

SYNOPSIS

10       pnmtopalm
11
12       [-verbose]
13
14       [-depth=N]
15
16       [-maxdepth=N]
17
18       [-colormap]
19
20       [-transparent=colorspec]
21
22       [-density=N]
23
24       [-offset]
25
26       [-withdummy] [-scanline_compression | -rle_compression | -packbits_com‐
27       pression]
28
29       [pnmfile]
30
31       Minimum unique abbreviation of option is acceptable.  You may use  dou‐
32       ble  hyphens  instead  of single hyphen to denote options.  You may use
33       white space in place of the equals sign to separate an option name from
34       its value.
35
36

DESCRIPTION

38       This program is part of Netpbm(1).
39
40       pnmtopalm  reads  a  PNM image as input, from Standard Input or pnmfile
41       and produces a Palm Bitmap as output.
42
43       Palm Bitmap files are either grayscale files with 1, 2, or 4  bits  per
44       pixel,  or  mapped  color files with 8 bit per pixel, or a direct color
45       file with 16 bits per pixel, and pnmtopalm  chooses  this  color  depth
46       based on the maxval and number of colors in the input, unless you spec‐
47       ify a depth (bits per pixel) with -depth.  You can also specify a maxi‐
48       mum  depth  with  -maxdepth  to partially constrain pnmtopalm's choice.
49       Input files must have an appropriate number and set of colors  for  the
50       selected output constraints.
51
52       This  often means that you should run the PNM image through pnmquant or
53       pnmremap before you pass it to pnmtopalm.  Netpbm  comes  with  several
54       colormap  files  you  can use with pnmremap for this purpose.  They are
55       palmgray2.map (4 shades of gray for a depth of  2),  palmgray4.map  (16
56       shades  of  gray  for  a depth of 4), and palmcolor8.map (232 colors in
57       default Palm colormap).  In a standard Netpbm installation,  these  are
58       in  the  Netpbm data directory, and you can find the Netpbm data direc‐
59       tory with a netpbm-config --datadir shell command.
60
61       Example:
62
63         pnmremap myimage.ppm \
64                  -mapfile=$(netpbm-config --datadir)/palmgray2.map \
65         | pnmtopalm -depth=2 >myimage.palm
66
67
68       Compressed Palm Bitmap files, at least the ones pnmtopalm knows how  to
69       create,  cannot have more than 8 bits per pixel.  pnmtopalm defaults to
70       8 bits per pixel if you specify a compressed output.  You  can  specify
71       the number of bits per pixel explicitly with -depth.  -maxdepth has the
72       same effect as -depth.  If you specify more than 8 bits per pixel  with
73       either of these, pnmtopalm fails.
74
75
76   Palm Bitmap Version
77       pnmtopalm  generates a Version 0, 1, 2, or 3 Palm Bitmap.  It generates
78       the oldest (lowest) version it can for the given image and the  options
79       you specify.
80
81
82
83       ·      If  you  specify  a density (-density option) higher than "low,"
84              the version is at least 3.
85
86
87       ·      If you specify transparency (-transparent option)  or  any  com‐
88              pression, the version is at least 2.
89
90
91       ·      If you specify a custom colormap (-colormap option), the version
92              is at least 1.
93
94
95       ·      If the image has more than one bit per pixel, the version is  at
96              least 1.  The image has more than one bit per pixel if you spec‐
97              ify it with -depth or if you let it default and  the  image  has
98              more than two colors (or shades of gray).
99
100
101
102       All  releases  of Palm OS can read a Version 0 bitmap.  Palm OS 3.0 and
103       later can read a Version 1 bitmap.  Palm OS 3.5 and later  can  read  a
104       Version  2 bitmap.  To read a Version 3 bitmap, you need Palm OS Garnet
105       or a handheld running the High Density Display Feature Set.
106
107

OPTIONS

109       In addition to the options common to all programs  based  on  libnetpbm
110       (most notably -quiet, see
111        Common  Options ⟨index.html#commonoptions⟩ ), pnmtopalm recognizes the
112       following command line options:
113
114
115
116       -verbose
117              Display the format of the output file.
118
119
120       -depth=N
121              Produce a file of depth N, where N must be either 1, 2, 4, 8, or
122              16.   Because  the default Palm 8-bit colormap is not grayscale,
123              if the input is a grayscale or monochrome image, the output will
124              never  be  more  than  4  bits deep, regardless of the specified
125              depth.  Note that 8-bit color works  only  in  PalmOS  3.5  (and
126              higher),  and  16-bit direct color works only in PalmOS 4.0 (and
127              higher).  However, the 16-bit direct color format is  also  com‐
128              patible  with  the various PalmOS 3.x versions used in the Hand‐
129              spring Visor, so these images may also work in that device.
130
131
132       -maxdepth=N
133              Produce a file of minimal depth, but in any  case  less  than  N
134              bits  wide.   If  you  specify 16-bit, the output will always be
135              16-bit direct color.
136
137
138       -offset
139              Set the nextDepthOffset field in the palm file header  to  indi‐
140              cate  the  end  of  the  file  (and pad the end of the file to 4
141              bytes, since nextDepthOffset can point only  to  4  byte  bound‐
142              aries).
143
144              A  palm  image  file can contain multiple renditions of the same
145              image, with different color depths, so a viewer can  choose  one
146              appropriate  for  the  display.  The nextDepthOffset field tells
147              where in the stream the next rendition begins.
148
149              pnmtopalm creates a file that contains only one image,  but  you
150              can  separately concatenate multiple one-image files to create a
151              multi-image file.  If you do that, you'll need to use -offset so
152              that the resulting concatenation is a correct stream.
153
154              By default (if you don't specify -offset), pnmtopalm generates a
155              nextDepthOffset field that says there is no following image (and
156              does not add any padding after the image).
157
158              Version  3  Palm  Bitmaps actually have a nextBitmapOffset field
159              instead of the nextDepthOffset.  The foregoing applies to which‐
160              ever is relevant.
161
162              The  -offset  option  was  new  in  Netpbm 10.26 (January 2005).
163              Before that, pnmtopalm always set the nextDepthOffset  field  to
164              "none."
165
166              Before  Netpbm 10.27 (March 2005), you cannot use -offset if you
167              create a compressed raster (because pnmtopalm isn't smart enough
168              to  be  able to know the size of the image at the time it writes
169              the header).  You also cannot use it with 16 bit color depth  or
170              with the -colormap option, for much the same reason.
171
172
173       -withdummy
174              This  option  tells  pnmtopalm  to  put in the stream, after the
175              image, a dummy image header to introduce subsequent high density
176              images.
177
178              This  dummy image header is a special sequence specified in Palm
179              Bitmap specifications.  It looks to an older Palm Bitmap  inter‐
180              preter like an invalid image header, so such an interpreter will
181              stop reading the stream there.  But a  new  Palm  Bitmap  inter‐
182              preter  recognizes it for what it is (just something to choke an
183              old interpreter) and skips over it.  Presumably, you will add to
184              the stream after this high density images which would confuse an
185              older interpreter.
186
187              If you specify -withdummy, you must also specify -offset,  since
188              it doesn't make any sense otherwise.
189
190              -withdummy was new in Netpbm 10.27 (March 2005).
191
192
193       -colormap
194              Build a custom colormap and include it in the output file.  This
195              is not recommended by Palm, for efficiency reasons.   Otherwise,
196              pnmtopalm uses the default Palm colormap for color output.
197
198
199       -transparent=colorspec
200              Marks one particular color as fully transparent.
201
202              colorspec   is   as   described   for   the   argument   of  the
203              pnm_parsecolor()                 library                 routine
204              ⟨libnetpbm_image.html#colorname⟩ .
205
206              Transparency works only on Palm OS 3.5 and higher.
207
208
209       -scanline_compression
210              Specifies that the output Palm bitmap will use the Palm scanline
211              compression scheme.  Scanline compression works only in Palm  OS
212              2.0 and higher.
213
214
215       -rle_compression
216              Specifies that the output Palm bitmap will use the Palm RLE com‐
217              pression scheme.  RLE compression works only with  Palm  OS  3.5
218              and higher.
219
220
221       -packbits_compression
222              Specifies that the output Palm bitmap will use the Palm packbits
223              compression scheme.  Packbits compression works only  with  Palm
224              OS 4.0 and higher.
225
226              This option was new in Netpbm 10.27 (March 2005).
227
228
229       -density=N
230              This specifies the Palm Bitmap density.  The density is a number
231              that is proportional to the resolution  the  image  should  have
232              when displayed.  The proportionality factor is up to whatever is
233              doing the displaying, but it's helpful to think of these numbers
234              as being pixels per inch.  The allowable values are:
235
236
237
238       ·      72
239
240       ·      108
241
242       ·      144
243
244       ·      216
245
246       ·      288
247
248
249              This  option  was  new  in  Netpbm  10.27 (March 2005).  Earlier
250              Netpbm could not generate Version 3 Palm Bitmaps, so  there  was
251              no such thing as density.
252
253
254
255

SEE ALSO

257       palmtopnm(1), pdbimgtopam(1), pnmquant(1), pnmremap(1), pnm(1)
258
259

NOTES

261       Palm  Bitmaps  may  contains multiple renditions of the same bitmap, in
262       different depths.  To construct  an  N-multiple-rendition  Palm  Bitmap
263       with  pnmtopalm,  first  construct  renditions  1 through N-1 using the
264       -offset option, then  construct  the  Nth  image  without  the  -offset
265       option.   Then concatenate the individual renditions together in a sin‐
266       gle file using cat.
267
268       If you will include both high density and low density  renditions,  put
269       the  high  density  images last and when you create the last of the low
270       density images, use the -withdummy option.
271
272       If you specify the Palm packbits compression scheme for a 16-bit direct
273       color bitmap, this program generates an invalid bitmap.
274
275
276

AUTHORS

278       This program was originally written as ppmtoTbmp.c, by Ian Goldberg and
279       George Caswell.  It was completely re-written by Bill  Janssen  to  add
280       color,  compression, and transparency function.  Copyright 1995-2001 by
281       Ian Goldberg, George Caswell, and Bill Janssen.
282

DOCUMENT SOURCE

284       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
285       source.  The master documentation is at
286
287              http://netpbm.sourceforge.net/doc/pnmtopalm.html
288
289netpbm documentation            25 August 2017        Pnmtopalm User Manual(0)
Impressum