pamditherbw

converts grayscale images to black and white using dithering

TLDR

Dither to black and white
$ pamditherbw [input.pgm] > [output.pbm]
Dither with Floyd-Steinberg
$ pamditherbw -fs [input.pgm] > [output.pbm]
Dither with threshold
$ pamditherbw -threshold -value [0.5] [input.pgm] > [output.pbm]

SYNOPSIS

pamditherbw [options] [file]

DESCRIPTION

pamditherbw converts grayscale images to black and white using dithering. Multiple algorithms available for different quality/speed tradeoffs. Part of Netpbm toolkit.

PARAMETERS

-fs

Floyd-Steinberg dithering.
-threshold
Simple threshold.
-hilbert
Hilbert curve dithering.
-value n
Threshold value (0.0-1.0).

INSTALL

sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm

SEE ALSO

pgmtopbm(1), ppmquant(1)