man > ppmdither(1)

TLDR: ppmdither (tldr-pages)

Reduce the number of colors in an image by applying dithering.

  • Read a PPM image, apply dithering, and save it to a file
    ppmdither {{path/to/image.ppm}} > {{path/to/file.ppm}}
  • Specify the desired number of shades for each primary color
    ppmdither {{-r|-red}} {{2}} {{-g|-green}} {{3}} {{-b|-blue}} {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}
  • Specify the dimensions of the dithering matrix
    ppmdither {{-d|-dim}} {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}
Ppmdither User Manual(1)               General Commands Manual              Ppmdither User Manual(1)

NAME
       ppmdither - ordered dither for color images


SYNOPSIS
       ppmdither

       [-dim=power]

       [-red=n]

       [-green=n]

       [-blue=n]

       [netpbmfile]

       All  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐
       stead of one to designate an option.  You may use either white space or an  equals  sign  be‐
       tween an option name and its value.



DESCRIPTION
       This program is part of Netpbm(1).

       ppmdither  reads a Netpbm image as input, and applies dithering to it to reduce the number of
       colors used down to the specified number of shades for each primary.  It produces a PPM image
       as output.

       The default number of shades is 5 red, 9 green, and 5 blue, for a total of  225  colors.   To
       convert  the  image  to a binary rgb format suitable for primitive color printers, use -red=2
       -green=2 -blue=2.

       You can do another kind of dither -- Floyd-Steinberg -- with pnmquant or pnmremap.


OPTIONS
       In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,
       see ]8;;index.html#commonoptions\ Common Options]8;;\ ), ppmdither recognizes the following command line options:



       -dim power
               The  size  of the dithering matrix.  The dithering matrix is a square whose dimension
              is a power of 2.  power is that power of 2.  The default is 4, for a 16 by 16 matrix.


       -red=n The number of red shades to be used, including black; minimum of 2.

              Default is 5.


       -green n
              The number of green shades to be used, including black; minimum of 2.

              Default is 9.


       -blue n
              The number of blue shades to be used, including black; minimum of 2.

              Default is 5.



SEE ALSO
       pamditherbw(1), pamdepth(1), pnmquant(1), pnmremap(1), ppm(1)


AUTHOR
       Copyright (C) 1991 by Christos Zoulas.

DOCUMENT SOURCE
       This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master
       documentation is at

              http://netpbm.sourceforge.net/doc/ppmdither.html

netpbm documentation                      16 December 2009                  Ppmdither User Manual(1)
ppmdither(1)
NAME SYNOPSIS
ppmdither
DESCRIPTION
-green=2 -blue=2.
OPTIONS
-dim power -red=n The number of red shades to be used, including black; minimum of 2. -green n -blue n
SEE ALSO AUTHOR DOCUMENT SOURCE

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-09 09:02 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^