summary refs log tree commit diff
path: root/pgmtopbm.html
blob: 37c5921e02e93f9bacfe705feca653686313bf96 (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pgmtopbm User Manual</title></head>
<body>
<h1>pgmtopbm</h1>
Updated: 17 July 2020
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pgmtopbm - convert a PGM image to PBM

<h2 id="synopsis">SYNOPSIS</h2>

<b>pgmtopbm</b>

[<b>-floyd</b> | <b>-fs</b> | <b>-threshold</b>
| <b>-hilbert</b>
| <b>-dither8</b> | <b>-d8</b> | <b>-cluster3</b>
| <b>-c3</b> | <b>-cluster4</b> | <b>-c4</b>
| <b>-cluster8</b> | <b>-c8</b>]

[<b>-value</b> <i>val</i>]

[<b>-clump</b> <i>size</i>]

[<b>-randomseed</b> <i>integer</i>]

[<i>pgmfile</i>]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p>This program is almost entirely obsolete since Netpbm 10.23 (July
2004).  Use <a href="pamditherbw.html"><b>pamditherbw</b></a> to do
what this program used to do.

<p><b>pgmtopbm</b> 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.

<p><b>pamditherbw</b> is backward compatible with <b>pgmtopbm</b>
except that it 
<ul>
<li>does the correct gamma adjustments.
<li>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 <b>pamtopnm</b> with <b>pamditherbw</b>).
</ul>
So use the manual for <b>pamditherbw</b> for <b>pgmtopbm</b>, 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.

<p>Although <b>pgmtopbm</b> is mostly obsolete, the simple threshold
method (specified by <b>-threshold</b>) is an exception.  Unlike the
other conversion methods, gamma-adjustment is not an issue with
simple thresholding and <b>pgmtopbm</b> can produce PBM output
directly.  Note that even in this basic mode of operation
<b>pgmtopbm</b> may produce output which is slightly different from
what <b>pamditherbw</b> does because of differences in internal
calculation.

<p>If you just want to convert a PGM image with maxval 1 to PBM,
use <a href="pamtopnm.html"><b>pamtopnm</b></a>.

<h2 id="seealso">SEE ALSO</h2>

<a href="pamditherbw.html">pamditherbw</a>,
<a href="pamtopnm.html">pamtopnm</a>,
<a href="pbmtopgm.html">pbmtopgm</a>,
<a href="pamthreshold.html">pamthreshold</a>,
<a href="pbmreduce.html">pbmreduce</a>,
<a href="pgm.html">pgm</a>,
<a href="pbm.html">pbm</a>

<h2 id="author">AUTHOR</h2>

Copyright (C) 1989 by Jef Poskanzer.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>