Blame userguide/pbmtopgm.html

Packit 78deda
Packit 78deda
<HTML><HEAD><TITLE>Pbmtopgm User Manual</TITLE></HEAD>
Packit 78deda
<BODY>
Packit 78deda
Packit 78deda

pbmtopgm

Packit 78deda

Updated: 05 Feb 2003

Packit 78deda
Packit 78deda
Table Of Contents
Packit 78deda
Packit 78deda
 
Packit 78deda

NAME

Packit 78deda
pbmtopgm - convert PBM image to PGM by averaging areas
Packit 78deda
Packit 78deda
 
Packit 78deda

SYNOPSIS

Packit 78deda
Packit 78deda
pbmtopgm 
Packit 78deda
width
Packit 78deda
height
Packit 78deda
[pbmfile]
Packit 78deda
Packit 78deda
 
Packit 78deda

DESCRIPTION

Packit 78deda
Packit 78deda

This program is part of Netpbm.

Packit 78deda
Packit 78deda

pbmtopgm reads a PBM image as input. It outputs a PGM image

Packit 78deda
in which each pixel's gray level is the average of the surrounding
Packit 78deda
black and white input pixels.  The surrounding area is a rectangle of
Packit 78deda
width by height pixels.
Packit 78deda
Packit 78deda

In other words, this is a convolution. pbmtopgm is similar

Packit 78deda
to a special case of pnmconvol.
Packit 78deda
Packit 78deda

You may need a pnmsmooth step after pbmtopgm.

Packit 78deda
Packit 78deda

pbmtopgm has the effect of anti-aliasing bitmaps which

Packit 78deda
contain distinct line features.
Packit 78deda
Packit 78deda

pbmtopgm works best with odd sample width and heights.

Packit 78deda
Packit 78deda

You don't need pbmtopgm just to use a PGM program on a PBM

Packit 78deda
image.  Any PGM program (assuming it uses the Netpbm libraries to read
Packit 78deda
the PGM input) takes PBM input as if it were PGM, with only the
Packit 78deda
minimum and maximum gray levels.  So unless your convolution rectangle
Packit 78deda
is bigger than one pixel, you're not gaining anything with a
Packit 78deda
pbmtopgm step.
Packit 78deda
Packit 78deda

The opposite transformation (which would turn a PGM into a PBM) is

Packit 78deda
dithering.  See pamditherbw.
Packit 78deda
Packit 78deda
 
Packit 78deda

SEE ALSO

Packit 78deda
Packit 78deda
pamditherbw,
Packit 78deda
pnmconvol,
Packit 78deda
pbm,
Packit 78deda
pgm
Packit 78deda
Packit 78deda
 
Packit 78deda

AUTHOR

Packit 78deda
Packit 78deda

Copyright (C) 1990 by Angus Duggan.

Packit 78deda

Copyright (C) 1989 by Jef Poskanzer.

Packit 78deda
Packit 78deda

Permission to use, copy, modify, and distribute this software and

Packit 78deda
its documentation for any purpose and without fee is hereby granted,
Packit 78deda
provided that the above copyright notice appear in all copies and that
Packit 78deda
both that copyright notice and this permission notice appear in
Packit 78deda
supporting documentation.  This software is provided "as is"
Packit 78deda
without express or implied warranty.
Packit 78deda
Packit 78deda

Packit 78deda
 
Packit 78deda

Table Of Contents

Packit 78deda
    Packit 78deda
  • NAME
  • Packit 78deda
  • SYNOPSIS
  • Packit 78deda
  • DESCRIPTION
  • Packit 78deda
  • SEE ALSO
  • Packit 78deda
  • AUTHOR
  • Packit 78deda
    Packit 78deda
    </BODY>
    Packit 78deda
    </HTML>