EnglishFrenchSpanish

OnWorks favicon

ppmquant - Online in the Cloud

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

This is the command ppmquant 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


ppmquant - quantize the colors in a portable pixmap down to a specified number

SYNOPSIS


ppmquant [-floyd|-fs] ncolors [ppmfile]
ppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]

All options can be abbreviated to their shortest unique prefix. You may use two hyphens
instead of one to designate an option. You may use either white space or equals signs
between an option name and its value.

DESCRIPTION


pnmquant is a newer, more general program that is backward compatible with ppmquant.
ppmquant may be faster, though.

Reads a PPM image as input. Chooses ncolors colors to best represent the image, maps the
existing colors to the new ones, and writes a PPM image as output.

The quantization method is Heckbert's "median cut".

Alternately, you can skip the color-choosing step by specifying your own set of colors
with the -mapfile option. The mapfile is just a ppm file; it can be any shape, all that
matters is the colors in it. For instance, to quantize down to the 8-color IBM TTL color
set, you might use:
P3
8 1
255
0 0 0
255 0 0
0 255 0
0 0 255
255 255 0
255 0 255
0 255 255
255 255 255
If you want to quantize one image to use the colors in another one, just use the second
one as the mapfile. You don't have to reduce it down to only one pixel of each color,
just use it as is.

If you use a mapfile, the output image has the same maxval as the mapfile. Otherwise, the
output maxval is the same as the input maxval, or less in some cases where the
quantization process reduces the necessary resolution.

The -floyd/-fs option enables a Floyd-Steinberg error diffusion step. Floyd-Steinberg
gives vastly better results on images where the unmodified quantization has banding or
other artifacts, especially when going to a small number of colors such as the above IBM
set. However, it does take substantially more CPU time, so the default is off.

-nofloyd/-nofs means not to use the Floyd-Steinberg error diffusion. This is the default.

REFERENCES


"Color Image Quantization for Frame Buffer Display" by Paul Heckbert, SIGGRAPH '82
Proceedings, page 297.

Use ppmquant online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 2
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 3
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 4
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 5
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 6
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • More »

Linux commands

Ad