EnglishFrenchSpanish

OnWorks favicon

pgmtopbm - Online in the Cloud

Run pgmtopbm in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command pgmtopbm that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


pgmtopbm - convert a portable graymap into a portable bitmap

SYNOPSIS


pgmtopbm [-floyd|-fs|-threshold |-hilbert |-dither8|-d8|-cluster3 |-c3|-cluster4|-c4
|-cluster8|-c8] [-value val] [-clump size] [pgmfile]

DESCRIPTION


Reads a portable graymap as input. Produces a portable bitmap as output.

Note that there is no pbmtopgm converter. Any program that uses the Netpbm libraries to
read PGM files, including virtually all programs in the Netpbm package, will read a PBM
file automatically as if it were a PGM file.

If you are using a less intelligent program that expects PGM input, use pnmdepth to
convert the PBM file to PGM. As long as the depth is greater than 1, pnmdepth will
generate PGM. This less intelligent program quite probably is also not intelligent enough
to deal with general maxvals, so you should specify a depth of 255.

OPTIONS


The default quantization method is boustrophedonic Floyd-Steinberg error diffusion (-floyd
or -fs). Also available are simple thresholding (-threshold); Bayer's ordered dither
(-dither8) with a 16x16 matrix; and three different sizes of 45-degree clustered-dot
dither (-cluster3, -cluster4, -cluster8). A space filling curve halftoning method using
the Hilbert curve is also available. (-hilbert);

Floyd-Steinberg will almost always give the best looking results; however, looking good is
not always what you want. For instance, thresholding can be used in a pipeline with the
pnmconvol tool, for tasks like edge and peak detection. And clustered-dot dithering gives
a newspaper-ish look, a useful special effect.

The -value flag alters the thresholding value for Floyd-Steinberg and simple thresholding.
It should be a real number between 0 and 1. Above 0.5 means darker images; below 0.5
means lighter.

The Hilbert curve method is useful for processing images before display on devices that do
not render individual pixels distinctly (like laser printers). This dithering method can
give better results than the dithering usually done by the laser printers themselves. The
-clump flag alters the number of pixels in a clump. This is usually an integer between 2
and 100 (default 5). Smaller clump sizes smear the image less and are less grainy, but
seem to loose some grey scale linearity. Typically a PGM image will have to be scaled to
fit on a laser printer page (2400 x 3000 pixels for an A4 300 dpi page), and then dithered
to a PBM image before being converted to a postscript file. A printing pipeline might
look something like: pnmscale -xysize 2400 3000 image.pgm | pgmtopbm -hil | pnmtops -scale
0.25 > image.ps

All flags can be abbreviated to their shortest unique prefix.

REFERENCES


The only reference you need for this stuff is "Digital Halftoning" by Robert Ulichney, MIT
Press, ISBN 0-262-21009-6.

The Hilbert curve space filling method is taken from "Digital Halftoning with Space
Filling Curves" by Luiz Velho, Computer Graphics Volume 25, Number 4, proceedings of
SIGRAPH '91, page 81. ISBN 0-89791-436-8

Use pgmtopbm online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Crater
    Crater
    Crater is an open-source web &
    mobile invoicing app made especially for
    freelancers and small businesses.
    It's the complete invoicing solution
    you need...
    Download Crater
  • 2
    formkiq-core
    formkiq-core
    FormKiQ Core is an Open Source Document
    Management System (DMS), available to
    run as a headless software or with a
    web-based client, deployed to your
    Amazon We...
    Download formkiq-core
  • 3
    Blackfriday
    Blackfriday
    Blackfriday is a Markdown processor
    implemented in Go. It is paranoid about
    its input (so you can safely feed it
    user-supplied data), it is fast, it
    supports c...
    Download Blackfriday
  • 4
    QNAP NAS GPL Source
    QNAP NAS GPL Source
    GPL source for QNAP Turbo NAS.
    Audience: Developers. User interface:
    Web-based. Programming Language: C,
    Java. Categories:System, Storage,
    Operating System Ker...
    Download QNAP NAS GPL Source
  • 5
    deep-clean
    deep-clean
    A Kotlin script that nukes all build
    caches from Gradle/Android projects.
    Useful when Gradle or the IDE let you
    down. The script has been tested on
    macOS, but ...
    Download deep-clean
  • 6
    Eclipse Checkstyle Plug-in
    Eclipse Checkstyle Plug-in
    The Eclipse Checkstyle plug-in
    integrates the Checkstyle Java code
    auditor into the Eclipse IDE. The
    plug-in provides real-time feedback to
    the user about viol...
    Download Eclipse Checkstyle Plug-in
  • More »

Linux commands

Ad