forked from kornelski/pngquant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpngquant.1
116 lines (116 loc) · 2.91 KB
/
pngquant.1
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
.Dd 2013-02-25
.Dt pngquant 1
.Sh NAME
.Nm pngquant
.Nd PNG converter and lossy image compressor
.Sh SYNOPSIS
.Nm
.Aq options
.Op ncolors
.Pa file
.Op Ar
.Nm
.Aq options
.Op ncolors
.Fl
.Cm < Ns Pa file
.Cm > Ns Pa file
.Sh DESCRIPTION
.Nm
converts 32-bit RGBA PNGs to 8-bit (or smaller) RGBA-palette PNGs, optionally using Floyd-Steinberg dithering.
The output filename is the same as the input name except that it ends in
.Ql -fs8.png
or
.Ql -or8.png
(unless the input is stdin, in which case the quantized image will go to stdout).
The default behavior if the output file exists is to skip the conversion; use
.Fl Fl force
to overwrite.
.Sh OPTIONS
.Bl -tag -width -indent
.It Fl Fl ext Ar new.png
File extension (suffix) to use for output files instead of the default
.Ql -fs8.png
or
.Ql -or8.png .
.It Fl f , Fl Fl force
Overwrite existing output files.
.Do
.Fl Fl ext
.Ar .png
.Fl Fl force
.Dc
can be used to convert files in place (which is unsafe).
.It Fl Fl nofs , Fl Fl ordered
Disable Floyd-Steinberg dithering. It's enabled by default
.Pq Fl Fl floyd .
.It Fl s Ar N , Fl Fl speed Ar N
.Cm 1
(brute-force) to
.Cm 11
(fastest). The default is
.Cm 3 .
Speed
.Cm 10
has 5% lower quality, but is about 8 times faster than the default. Speed 11 disables dithering and lowers compression level.
.It Fl Q Ar min-max , Fl Fl quality Ar min-max
.Va min
and
.Va max
are numbers in range
.Cm 0
(worst) to
.Cm 100
(perfect), similar to JPEG.
.Nm
will use the least amount of colors required to meet or exceed the
.Va max
quality. If conversion results in quality below the
.Va min
quality the image won't be saved (or if outputting to stdin, 24-bit original will be output) and pngquant will exit with status code
.Er 99 .
.It Fl Fl iebug
Workaround for Internet Explorer 6, which only displays fully opaque pixels.
.Nm
will make almost-opaque pixels fully opaque and will reduce amount of semi-transparent colors. When this option is enabled the default filename suffix is
.Ql -ie-fs8.png
/
.Ql -ie-or8.png .
.It Fl Fl transbug
Workaround for readers that expect fully transparent color to be the last entry in the palette.
.It Fl v , Fl Fl verbose
Enable verbose messages showing progress and information about input/output. Opposite is
.Fl Fl quiet .
Errors are output to
.Pa stderr
regardless of this option.
.It Fl V , Fl Fl version
Display version on
.Pa stdout
and exit.
.It Fl h , Fl Fl help
Display help and exit.
.El
.Sh EXAMPLE
Creating a new image with the number of colors reduced to 64:
.Bd -ragged -offset indent
.Nm
.Cm 64 image.png
.Ed
.Pp
The resulting image will have 64 colors and will be saved as
.Pa image-fs8.png .
.Pp
Overwriting image in-place if it can be reduced without too much quality loss:
.Bd -ragged -offset indent
.Nm
.Cm -f --ext .png --quality 70-95 image.png
.Ed
.Sh AUTHOR
.Nm
is developed by Kornel Lesinski
.Aq Mt [email protected]
based on code by Greg Roelofs
.Aq Mt [email protected] .
.Pp
.Lk http://pngquant.org "pngquant homepage" .