phpman > man > ppmhist(1)

Markdown | JSON | MCP    

TLDR: ppmhist (tldr-pages)

Print a histogram of the colors present in a PPM image.

  • Generate the histogram for human reading
    ppmhist {{-nom|-nomap}} {{path/to/image.ppm}}
  • Generate a PPM file of the colormap for the image, with the color histogram as comments
    ppmhist {{-m|-map}} {{path/to/image.ppm}}
  • Display version
    ppmhist {{-v|-version}}
ppmhist(1)                             General Commands Manual                            ppmhist(1)



NAME
       ppmhist - print a histogram of a portable pixmap


SYNOPSIS
       ppmhist [-hexcolor] [-noheader] [-map] [-nomap] [-sort={frequency,rgb}] [ppmfile]


DESCRIPTION
       Reads a PPM image as input.  Generates a histogram of the colors in the image, i.e. a list of
       all the colors and how many pixels of each color are in the image.


OPTIONS
       -sort={frequency,rgb}
              The -sort option determines the order in which the colors are listed  in  the  output.
              frequency means to list them in order of how pixels in the input image have the color,
              with the most represented colors first.  rgb means to sort them first by the intensity
              of  the red component of the color, the of the green, then of the blue, with the least
              intense first.

              The default is frequency.


       -hexcolor
              Print the color components in hexadecimal.  Default is decimal.

       -noheader
              Do not print the column headings.

       -map   Generates a PPM file of the colormap for the image, with the color histogram  as  com‐
              ments.

       -nomap Generates the histogram for human reading.  This is the default.



SEE ALSO
       ppm(5), pgmhist(1), ppmtomap(1), pnmhistmap(1), ppmchange(1)


AUTHOR
       Copyright (C) 1989 by Jef Poskanzer.



                                          17 September 2000                               ppmhist(1)

Generated by phpman v3.7.12 Author: Che Dong Under GNU General Public License
2026-06-13 06:57 @216.73.216.28
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!