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

NAME

6       pngtopnm - convert a PNG image into a PNM image
7
8

SYNOPSIS

10       pngtopnm  [-verbose] [-alpha | -mix] [-background=color] [-gamma=value]
11       [-text=filename] [-time] [pngfile]
12
13       Minimum unique abbreviation of option is acceptable.  You may use  dou‐
14       ble  hyphens  instead  of single hyphen to denote options.  You may use
15       white space in place of the equals sign to separate an option name from
16       its value.
17
18

DESCRIPTION

20       This program is part of Netpbm(1).
21
22       pngtopnm  reads  a  PNG  image (Portable Network Graphics) as input and
23       produces a PPM image as output.  The type of the output file depends on
24       the  input  file  - if it's black & white, pngtopnm creates a PBM file.
25       If it's grayscale, pngtopnm creates a PGM file.  Otherwise, it  creates
26       a PPM file.
27
28

OPTIONS

30       -verbose
31              Display  various  information  about the input PNG image and the
32              conversion process.
33
34              If you want even more  information  about  the  PNG  image,  use
35              pngcheck (not part of Netpbm).
36
37
38       -alpha Output  the alpha channel or transparency mask of the image. The
39              result is either a PBM file or a PGM file, depending on  whether
40              different levels of transparency appear.
41
42
43       -mix   Compose  the image with the transparency or alpha mask against a
44              background.  The background color  is  determined  by  the  bKGD
45              chunk  in  the  PNG, except that you can override it with -back‐
46              ground.  If the PNG has no bKGD  chunk  and  you  don't  specify
47              -background, the background color is white.
48
49
50       -background=color
51              This option specifies the background color with which to mix the
52              image when you specify -mix.
53
54              color is as described for the argument of  the  ppm_parsecolor()
55              library routine ⟨libppm.html#colorname⟩ .
56
57              Examples:
58
59
60
61       ·      -background=rgb:01/ff/80
62
63       ·      -background=rgbi:1/255/128
64
65
66              If  you  don't specify -background, the background color is what
67              is specified in the PNG image, and if the  PNG  doesn't  specify
68              anything, white.
69
70              You  cannot  specify  -background  unless you also specify -mix.
71              Before Netpbm 10.27 (March 2005), you could specify  -background
72              with  -mix  and  it  was just ignored.  (This caused a usability
73              problem).
74
75
76
77       -gamma= value
78              Converts the image to a new  display-gamma  value.   If  a  gAMA
79              chunk  is  present  in the png-file, pngtopnm uses the specified
80              image-gamma value.  If not, pngtopnm considers  the  image-gamma
81              to be 1.0.  Based on the image-gamma and the display-gamma given
82              with this option, pngtopnm adjusts the  colors  written  to  the
83              pnm-file.
84
85              Because  the  gammas  of  uncompensated monitors are around 2.6,
86              which results in an image-gamma of 0.45, some typical situations
87              are:  when  the  image-gamma is 0.45 (use -verbose to check) and
88              the picture is too light, your  system  is  gamma-corrected,  so
89              convert with '-gamma 1.0'.  When no gAMA chunk is present or the
90              image-gamma is 1.0, use 2.2 to make the picture lighter and 0.45
91              to make the picture darker.
92
93
94       -text=file
95              Writes  the  tEXt  and  zTXt  chunks  to  a file, in a format as
96              described in the pnmtopng user  manual.   These  chunks  contain
97              text comments or annotations.
98
99
100       -time  Prints the tIME chunk to stderr.
101
102
103
104

SEE ALSO

106       pnmtopng(1), ptot, pnmgamma(1), pnm(1)
107
108       For   information   on   the   PNG  format,  see  http://schaik.com/png
109http://schaik.com/png⟩ .
110
111

NOTE

113       A PNG image contains a lot of information that can't be represented  in
114       Netpbm  formats.   Therefore,  you lose information when you convert to
115       another format with "pngtopnm | pnmtoxxx".  If there is  a  specialized
116       converter that converts directly to the other format, e.g. ptot to con‐
117       vert from PNG to TIFF, you'll get better results using that.
118
119

LIMITATIONS

121       There could be an option to read the comment  text  from  pnm  comments
122       instead of a separate file.
123
124       The  program  could  be much faster, with a bit of code optimizing.  As
125       with any Netpbm program, speed  always  takes  a  back  seat  to  quick
126       present and future development.
127
128

AUTHORS

130       Copyright (C) 1995-1997 by Alexander Lehmann and Willem van Schaik.
131
132
133
134netpbm documentation             24 March 2005         Pngtopnm User Manual(0)
Impressum