about summary refs log tree commit diff
path: root/pbmtopgm.html
blob: f68dfcadca08130cecac0bc007be55f162b2012b (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pbmtopgm User Manual</TITLE></HEAD>
<BODY>

<H1>pbmtopgm</H1>
<p>Updated: 05 Feb 2003

<A HREF="#index">Table Of Contents</A>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
pbmtopgm - convert PBM image to PGM by averaging areas

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

<B>pbmtopgm </B>
<I>width</I>
<I>height</I>
[<I>pbmfile</I>]

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

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

<P><B>pbmtopgm</B> reads a PBM image as input.  It outputs a PGM image
in which each pixel's gray level is the average of the surrounding
black and white input pixels.  The surrounding area is a rectangle of
<I>width</I> by <I>height</I> pixels.

<P>In other words, this is a convolution.  <B>pbmtopgm</B> is similar
to a special case of <B>pnmconvol</B>.

<P>You may need a <B>pnmsmooth</B> step after <B>pbmtopgm</B>.

<P><B>pbmtopgm</B> has the effect of anti-aliasing bitmaps which
contain distinct line features.

<P><B>pbmtopgm</B> works best with odd sample width and heights.

<P>You don't need <B>pbmtopgm</B> just to use a PGM program on a PBM
image.  Any PGM program (assuming it uses the Netpbm libraries to read
the PGM input) takes PBM input as if it were PGM, with only the
mininum and maximum gray levels.  So unless your convolution rectangle
is bigger than one pixel, you're not gaining anything with a
<B>pbmtopgm</B> step.

<p>The opposite transformation (which would turn a PGM into a PBM) is
dithering.  See <b>pamditherbw</b>.

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

<B><A HREF="pamditherbw.html">pamditherbw</A></B>,
<B><A HREF="pnmconvol.html">pnmconvol</A></B>,
<B><A HREF="pbm.html">pbm</A></B>,
<B><A HREF="pgm.html">pgm</A></B>

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

<P>Copyright (C) 1990 by Angus Duggan.
<P>Copyright (C) 1989 by Jef Poskanzer.

<P>Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.  This software is provided &quot;as is&quot;
without express or implied warranty.

<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">SEE ALSO</A>
<LI><A HREF="#lbAF">AUTHOR</A>
</UL>
</BODY>
</HTML>