• I designed and wrote ppmdist, which is a part of the netpbm package of graphics utilities.

    ppmdist isn't all that different from ppmtopgm in that it converts from color to greyscale, except that if you have a color image having (just for example) three colors - the background, and some foreground stuff in a red and a green in an unfortunate brightness ratio, then with ppmtopgm it'll be hard to tell apart the red from the green in the resulting image. With ppmdist, the (grayscale) contrast between the red and green is maximized, making it much easier to tell them apart.

    ppmdist works best with low-color computer-generated images.

    Here are 3 example images to show what ppmdist does. Granted, I've carefully picked the red and green intensities:

    1. This is a color image:
    2. This is that same image, converted with ppmtopgm:
    3. This is that same color image again, converted with ppmdist. Note that the shades of gray are distinguishable from each other:



    Hits: 2432
    Timestamp: 2024-12-27 08:37:06 PST

    Back to Dan's tech tidbits

    You can e-mail the author with questions or comments: