summaryrefslogtreecommitdiffstats
path: root/upstream/fedora-40/man1/pgmtopbm.1
blob: 81d5345b7b7e13cf4439333006f2f83cad367470 (plain)
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
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pgmtopbm User Manual" 0 "17 July 2020" "netpbm documentation"

.SH NAME

pgmtopbm - convert a PGM image to PBM

.UN synopsis
.SH SYNOPSIS

\fBpgmtopbm\fP

[\fB-floyd\fP | \fB-fs\fP | \fB-threshold\fP
| \fB-hilbert\fP
| \fB-dither8\fP | \fB-d8\fP | \fB-cluster3\fP
| \fB-c3\fP | \fB-cluster4\fP | \fB-c4\fP
| \fB-cluster8\fP | \fB-c8\fP]

[\fB-value\fP \fIval\fP]

[\fB-clump\fP \fIsize\fP]

[\fB-randomseed\fP \fIinteger\fP]

[\fIpgmfile\fP]

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
This program is almost entirely obsolete since Netpbm 10.23 (July
2004).  Use
.BR "\fBpamditherbw\fP" (1)\c
\& to do
what this program used to do.
.PP
\fBpgmtopbm\fP never was the simple converter it appeared to be.
It was a dithering program.  Unfortunately, it didn't do the dithering
properly because it treated the PGM input samples as if they were
directly proportional to light intensity, but they are actually
gamma-adjusted.
.PP
\fBpamditherbw\fP is backward compatible with \fBpgmtopbm\fP
except that it 

.IP \(bu
does the correct gamma adjustments.
.IP \(bu
produces PAM output instead of PBM.  (Modern Netpbm programs that
accept PBM input also accept PAM input, but if you need actual PBM,
you can use \fBpamtopnm\fP with \fBpamditherbw\fP).

So use the manual for \fBpamditherbw\fP for \fBpgmtopbm\fP, except
ignore anything that says it was added after Netpbm Release 10.23
and ignore any options that are not shown in the synopsis above.
.PP
Although \fBpgmtopbm\fP is mostly obsolete, the simple threshold
method (specified by \fB-threshold\fP) is an exception.  Unlike the
other conversion methods, gamma-adjustment is not an issue with
simple thresholding and \fBpgmtopbm\fP can produce PBM output
directly.  Note that even in this basic mode of operation
\fBpgmtopbm\fP may produce output which is slightly different from
what \fBpamditherbw\fP does because of differences in internal
calculation.
.PP
If you just want to convert a PGM image with maxval 1 to PBM,
use
.BR "\fBpamtopnm\fP" (1)\c
\&.

.UN seealso
.SH SEE ALSO
.BR "pamditherbw" (1)\c
\&,
.BR "pamtopnm" (1)\c
\&,
.BR "pbmtopgm" (1)\c
\&,
.BR "pamthreshold" (1)\c
\&,
.BR "pbmreduce" (1)\c
\&,
.BR "pgm" (1)\c
\&,
.BR "pbm" (1)\c
\&

.UN author
.SH AUTHOR

Copyright (C) 1989 by Jef Poskanzer.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pgmtopbm.html
.PP