LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppmhist

Display color histogram of PPM images

TLDR

Show color histogram
$ ppmhist [input.ppm]
copy
Show as map file
$ ppmhist -map [input.ppm]
copy
Limit output colors
$ ppmhist -noheader [input.ppm] | head -20
copy

SYNOPSIS

ppmhist [options] [file]

DESCRIPTION

ppmhist reads a PPM (Portable Pixmap) image and prints a color histogram showing each distinct color and the number of pixels using it. It is part of the Netpbm toolkit and is useful for analyzing palette usage, identifying dominant colors, and preparing colormaps for quantization.By default the output is a sorted text table. With -map, the output is itself a valid PPM file representing the colormap, which can be fed to other Netpbm tools.

PARAMETERS

-map

Output a colormap as a PPM file rather than a text table.
-nomap
Force text histogram output (the default).
-noheader
Omit the leading header line from text output.
-sort method
Sort entries by frequency or rgb.

INSTALL

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

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid