1Ppmtobmp User Manual(0) Ppmtobmp User Manual(0)
2
3
4
6 ppmtobmp - convert a PPM image into a BMP file
7
8
10 ppmtobmp
11
12 [-windows]
13
14 [-os2]
15
16 [-bpp=bits_per_pixel]
17
18 [-mapfile=filename]
19
20 [ppmfile]
21
22 Minimum unique abbreviation of option is acceptable. You may use dou‐
23 ble hyphens instead of single hyphen to denote options. You may use
24 white space in place of the equals sign to separate an option name from
25 its value.
26
27
28
30 This program is part of Netpbm(1).
31
32 ppmtobmp reads a PPM image as input and produces a Microsoft Windows or
33 OS/2 BMP file as output.
34
35
37 -windows
38 Tells the program to produce a Microsoft Windows BMP file.
39 (This is the default.)
40
41
42 -os2 Tells the program to produce an OS/2 BMP file. (Before August
43 2000, this was the default).
44
45
46 -bpp This tells how many bits per pixel you want the BMP file to con‐
47 tain. Only 1, 4, 8, and 24 are possible. By default, ppmtobmp
48 chooses the smallest number with which it can represent all the
49 colors in the input image. If you specify a number too small to
50 represent all the colors in the input image, ppmtobmp tells you
51 and terminates. You can use pnmquant or ppmdither to reduce the
52 number of colors in the image.
53
54
55 -mapfile=filename
56 This identifies a file to use as the BMP palette (aka "col‐
57 ormap"). In one BMP subformat, the BMP stream contains a pal‐
58 ette of up to 256 colors, and represents the image raster as
59 indices into that palette. Normally, ppmtobmp takes care of
60 computing a suitable palette, but if you are going to dissect
61 the BMP output in some way, you may want certain values for the
62 palette indices. E.g. you might want red to be 13, where ppm‐
63 tobmp would (arbitrarily) choose 39. In that case, you can con‐
64 struct the palette yourself and use this option to tell ppmtobmp
65 to use your palette.
66
67 This option does not control what colors are in the output. The
68 colors in the output are exactly those in the input, and the
69 palette you supply must contain at least all the colors that are
70 in the input. You can use pnmremap to adjust your input image
71 so that it contains only colors from your palette.
72
73 The palette file is a Netpbm format file with one pixel per pal‐
74 ette entry. Each pixel must have a distinct color (no repeats).
75 The order of the BMP palette ppmtobmp generates is the order of
76 the pixels in the palette file, going from top to bottom, left
77 to right.
78
79 A BMP palette may have at most 256 colors, so the palette file
80 must have at most 256 pixels.
81
82 You may find pnmcolormap useful in generating the palette file.
83 pamseq too.
84
85 This option was new in Netpbm 10.45 (December 2008).
86
87
88
89
90
92 To get a faithful reproduction of the input image, the maxval of the
93 input image must be 255. If it is something else, the colors in the
94 BMP file may be slightly different from the colors in the input.
95
96 Windows icons are not BMP files. Use ppmtowinicon to create those.
97
98
100 bmptoppm(1), ppmtowinicon(1), pnmquant(1), ppmdither(1), pnmremap(1),
101 ppm(1)
102
103
105 Copyright (C) 1992 by David W. Sanderson.
106
108 This manual page was generated by the Netpbm tool 'makeman' from HTML
109 source. The master documentation is at
110
111 http://netpbm.sourceforge.net/doc/ppmtobmp.html
112
113netpbm documentation 29 October 2008 Ppmtobmp User Manual(0)