ppmtoansi converts a ppm-file to ansi text output e.g. colorized text.

Example usage in mutt

Add the following to your .mailcap file:
image/*; anytopnm %s 2> /dev/null | pnmnorm 2> /dev/null | pnmscale -xysize 120 50 | pnmnorm 2> /dev/null | ppmtoansi ; copiousoutput


Download link:ppmtoansi-0.4.tgz (sources)


0.4: grayscale mode added
0.3: speed improvement and better character selection in hls mode
0.2: improved colorselection by introducing '-m mode' where mode is either rgb or hls: hls gives the best colors, optimized output
0.1: initial release

Example output

example 4-tux
example 1

For contact info, see this page.