about summary refs log tree commit diff
path: root/ppmtopgm.html
blob: b7e5939430ffbd7bf0d55b0579b424668ccd464b (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Ppmtopgm User Manual</TITLE>
</HEAD><BODY>
<H1>ppmtopgm</H1>
Updated: 10 April 2000
<BR>
<A HREF="#index">Table Of Contents</A>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

ppmtopgm - convert a PPM image to a PGM image

<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>ppmtopgm</B>

[<I>ppmfile</I>]

<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

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

<p><b>ppmtopgm</b> reads a PPM as input and produces a PGM as output.
The output is a &quot;black and white&quot; rendering of the original
image, as in a black and white photograph.  The quantization formula
<b>ppmtopgm</b> uses is g = .299 r + .587 g + .114 b.

<P>Note that although there is a <B>pgmtoppm</B> program, it is not
necessary for simple conversions from pgm to ppm , because any ppm
program can read pgm (and pbm ) files automatically.  <B>pgmtoppm</B>
is for colorizing a pgm file.  Also, see <B>ppmtorgb3</B> for a
different way of converting color to gray.  And <B>ppmdist</B>
generates a grayscale image from a color image, but in a way that
makes it easy to differentiate the original colors, not necessarily a
way that looks like a black and white photograph.

<A NAME="lbAE">&nbsp;</A>
<H2>QUOTE</H2>

<PRE>
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
</PRE>

<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>

<B><A HREF="pgmtoppm.html">pgmtoppm</A></B>,
<B><A HREF="ppmtorgb3.html">ppmtorgb3</A></B>,
<B><A HREF="rgb3toppm.html">rgb3toppm</A></B>,
<B><A HREF="ppmdist.html">ppmdist</A></B>,
<B><A HREF="ppm.html">ppm</A></B>,
<B><A HREF="pgm.html">pgm</A></B>

<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>

Copyright (C) 1989 by Jef Poskanzer.

<HR>
<A NAME="index">&nbsp;</A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">QUOTE</A>
<LI><A HREF="#lbAF">SEE ALSO</A>
<LI><A HREF="#lbAG">AUTHOR</A>
</UL>
</BODY>
</HTML>