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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Ppmtobmp User Manual</TITLE>
</HEAD><BODY>
<H1>ppmtobmp</H1>
Updated: 29 October 2008
<BR>
<A HREF="#index">Table Of Contents</A>
<H2>NAME</H2>
ppmtobmp - convert a PPM image into a BMP file
<H2 id="synopsis">SYNOPSIS</H2>
<B>ppmtobmp</B>
[<B>-windows</B>]
[<B>-os2</B>]
[<B>-bpp=</B><I>bits_per_pixel</I>]
[<b>-mapfile=</b><i>filename</i>]
[<I>ppmfile</I>]
<p>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.
<H2 id="description">DESCRIPTION</H2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>ppmtobmp</b> reads a PPM image as input and produces a Microsoft
Windows or OS/2 BMP file as output.
<H2 id="options">OPTIONS</H2>
<DL COMPACT>
<DT><B>-windows</B>
<DD>Tells the program to produce a Microsoft Windows BMP file. (This
is the default.)
<DT><B>-os2</B>
<DD>Tells the program to produce an OS/2 BMP file. (Before August
2000, this was the default).
<DT><B>-bpp</B>
<DD>This tells how many bits per pixel you want the BMP file to
contain. Only 1, 4, 8, and 24 are possible. By default,
<B>ppmtobmp</B> chooses the smallest number with which it can
represent all the colors in the input image. If you specify a number
too small to represent all the colors in the input image,
<B>ppmtobmp</B> tells you and terminates. You can use <B>pnmquant</B>
or <B>ppmdither</B> to reduce the number of colors in the image.
<dt><b>-mapfile=</b><i>filename</i>
<dd>This identifies a file to use as the BMP palette (aka
"colormap"). In one BMP subformat, the BMP stream contains
a palette of up to 256 colors, and represents the image raster as
indices into that palette. Normally, <b>ppmtobmp</b> takes care of
computing a suitable palette, but if you are going to dissect the BMP
output in some way, you may want certain values for the palette
indices. E.g. you might want red to be 13, where <b>ppmtobmp</b>
would (arbitrarily) choose 39. In that case, you can construct the
palette yourself and use this option to tell <b>ppmtobmp</b> to use
your palette.
<p>This option does <em>not</em> control what colors are in the
output. The colors in the output are exactly those in the input, and
the palette you supply must contain at least all the colors that are
in the input. You can use <b>pnmremap</b> to adjust your input image
so that it contains only colors from your palette.
<p>The palette file is a Netpbm format file with one pixel per
palette entry. Each pixel must have a distinct color (no repeats).
The order of the BMP palette <b>ppmtobmp</b> generates is the order
of the pixels in the palette file, going from top to bottom, left
to right.
<p>A BMP palette may have at most 256 colors, so the palette file
must have at most 256 pixels.
<p>You may find <b>pnmcolormap</b> useful in generating the palette
file. <b>pamseq</b> too.
<p>This option was new in Netpbm 10.45 (December 2008).
</DL>
<H2 id="notes">NOTES</H2>
<P>To get a faithful reproduction of the input image, the maxval of the
input image must be 255. If it is something else,
the colors in the BMP file may be slightly different from the colors
in the input.
<P>Windows icons are not BMP files. Use <B>ppmtowinicon</B> to
create those.
<H2 id="seealso">SEE ALSO</H2>
<B><A HREF="bmptoppm.html">bmptoppm</A></B>,
<B><A HREF="ppmtowinicon.html">ppmtowinicon</A></B>,
<B><A HREF="pnmquant.html">pnmquant</A></B>,
<B><A HREF="ppmdither.html">ppmdither</A></B>,
<B><A HREF="pnmremap.html">pnmremap</A></B>,
<B><A HREF="ppm.html">ppm</A></B>
<H2 id="author">AUTHOR</H2>
Copyright (C) 1992 by David W. Sanderson.
<HR>
<H2 id="index">Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#options">OPTIONS</A>
<LI><A HREF="#notes">NOTES</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#author">AUTHOR</A>
</UL>
</BODY>
</HTML>
|