Penguin
Annotated edit history of pnmtopng(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmtopng
2 !!!pnmtopng
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 SEE ALSO
8 NOTE
9 BUGS
10 AUTHORS
11 ----
12 !!NAME
13
14
15 pnmtopng - convert a portable anymap into a Portable Network Graphics file
16 !!SYNOPSIS
17
18
19 __pnmtopng__ [[-verbose] [[-downscale] [[-interlace] [[-alpha
20 file]
21 [[-transparent [[=]color] [[-background color] [[-gamma
22 value]
23 [[-hist] [[-chroma wx wy rx ry gx gy bx by] [[-phys x y
24 unit]
25 [[-text file] [[-ztxt file] [[-time [[yy]yy-mm-dd hh:mm:ss]
26 [[-filter type] [[-compression level] [[-force]
27 [[''pnmfile'']
28 !!DESCRIPTION
29
30
31 Reads a portable pixmap as input. Produces a Portable
32 Network Graphics file as output.
33
34
35 Color values in PNG files are either eight or sixteen bits
36 wide, so ''pnmtopng'' will automatically scale colors to
37 have a maxval of 255 or 65535. Grayscale files will be
38 produced with bit depths 1, 2, 4, 8 or 16. An extra
39 ''pnmdepth'' step is not necessary.
40 !!OPTIONS
41
42
43 __-verbose__
44
45
46 Display the format of the output file.
47
48
49 __-downscale__
50
51
52 Enables scaling of maxvalues of more then 65535 to 16 bit.
53 Since this means loss of image data, the step is not
54 performed by default.
55
56
57 __-interlace__
58
59
60 Creates an interlaced PNG file (Adam7).
61
62
63 __-alpha file__
64
65
66 The alpha channel of pixel (or image) specifies the
67 transparency of a pixel. To create this fourth pixel value a
68 separate ''.pbm-'' or ''.pgm-file'' is needed. In this
69 file black (0) stands for fully transparant and white (1)
70 will become opaque. The sizes of both pbm/pgm/ppm-files must
71 be the same. If the information contained in the alpha mask
72 can also be represented as a transparency index, it will be
73 used, since this should result in a smaller image
74 file.
75
76
77 __-transparent color__
78
79
80 __ppmtogif__ marks the specified color as transparent in
81 the PNG image.
82
83
84 You specify the color as in ppmmake(1).__E.g.
85 red__ or __rgb:ff/00/0d__. If the color you specify is
86 not present in the image, __pnmtopnm__ selects instead
87 the color in the image that is closest to the one you
88 specify. Closeness is measured as a cartesian distance
89 between colors in RGB space. If multiple colors are
90 equidistant, __pnmtopnm__ chooses one of them
91 arbitrarily.
92
93
94 However, if you prefix your color specification with
95
96
97 __-transparent =red__
98
99
100 Only the exact color you specify will be transparent. If
101 that color does not appear in the image, there will be no
102 transparency. __pnmtopng__ issues an information message
103 when this is the case.
104
105
106 __-background color__
107
108
109 To create a background color chunck in the ''png-file,''
110 which can be used for subsequent alpha-channel or
111 transparent-color conversions. See -transparent for format
112 of color.
113
114
115 __-gamma value__
116
117
118 Creates an gAMA chunk. By providing the gamma-value of the
119 ''pnm-file'' the software that lateron will display the
120 ''png-file'' will be able to do the necessary
121 gamma-corrections. A good rule-of-thumb is that when the
122 file is created by a software program (like a CAD-program or
123 a ray-tracer) the value is probably 1.0. When the
124 ''pnm-file'' looks good on a non-gamma corrected PC
125 display (which has itself a gamma-value of 2.2 - 2.8), a
126 value of 0.45 should be given.
127
128
129 __-hist__
130
131
132 Use this parameter to create a chunk that specifies the
133 frequency (or histogram) of the colors in the
134 image.
135
136
137 __-chroma white point X and Y, red X and Y, green X and Y,
138 and blue X and Y__
139
140
141 To specify the white point and rgb values following the
142 CIE-1931 spec.
143
144
145 __-phys x y unit__
146
147
148 When your image should not be displayed with square but with
149 rectangular pixels this option should be used to create a
150 pHYS chunk. When the unit-value is 0 the x and y only gives
151 the ratio of pixel width and height. When it is 1 the x and
152 y specify the number of pixels per meter.
153
154
155 __-text file__
156
157
158 Allows to include comments in the text-chunk of the
159 ''png-file.'' The format of the text-file is as follows:
160 when the first column does not contain a blank or a tab, the
161 first word is considered to be the keyword. For keywords to
162 contain spaces, enclose them in double-quotes.
163 When the first character on a line is a blank or tab, the
164 rest of the line is a new line of the current comment. Note
165 that the initial spaces are not considered to be part of the
166 comment line.
167
168
169 Here is an example:
170 -------------------------------------------
171 Title PNG-file
172 Author your name
173 Description how to include a text-chunk into a PNG file
174 Software pnmtopng
175 -------------------------------------------
176
177
178 __-ztxt file__
179
180
181 The same as -text, but now the text will be
182 compressed.
183
184
185 __-time yy-mm-dd hh:mm:ss or -time yyyy-mm-dd
186 hh:mm:ss__
187
188
189 This option allows you to specify the (modification)time.
190 The year parameter can be given as a two- or a four-digit
191 value.
192
193
194 __-filter type__
195
196
197 When the types of filters must be restricted you can specify
198 here which filter you want to use. Allowed values are: 0
199 (none), 1 (sub), 2 (up), 3 (avg) and 4 (paeth).
200
201
202 __-compression level__
203
204
205 To explicitly set the compression level of zlib use this
206 parameter. Select a level between 0 for no compression (max
207 speed) and 9 for maximum compression.
208
209
210 __-force__
211
212
213 When set, -force limits the optimizations of pnmtopng. A
214 png-file similar to the pnm-input is as much as possible
215 enforced. For example no paletted files will be created and
216 alpha-channel images will not be converted to images with a
217 transparency chunck.
218
219
220 All flags can be abbreviated to their shortest unique
221 prefix.
222 !!SEE ALSO
223
224
225 pngtopnm(1), gif2png(1), pnmgamma(1), pnm(5)
226 !!NOTE
227
228
229 Instead of xxxtopnm|pnmtopng, a specific converter should be
230 used, if available. E.g. ''gif2png'' (GIF conversion),
231 etc.
232 !!BUGS
233
234
235 There could be an option to read the comment text from pnm
236 comments instead of a separate file.
237
238
239 The program could be much faster, with a bit of code
240 optimizing.
241 !!AUTHORS
242
243
244 Copyright (C) 1995-1997 by Alexander Lehmann
245 and Willem van Schaik.
246 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.