| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN"> |
| 2 | <html><head><title>Ppmtoascii User Manual</title></head> |
| 3 | <body> |
| 4 | <h1>ppmtoascii</h1> |
| 5 | Updated: 09 April 2010 |
| 6 | <br> |
| 7 | <a href="#index">Table Of Contents</a> |
| 8 | |
| 9 | <h2>NAME</h2> |
| 10 | ppmtoascii - convert a PPM image to ASCII graphics with ANSI terminal color |
| 11 | |
| 12 | <h2 id="synopsis">SYNOPSIS</h2> |
| 13 | |
| 14 | <b>ppmtoascii</b> |
| 15 | |
| 16 | [<b>-1x2</b>|<b>-2x4</b>] |
| 17 | |
| 18 | [<i>ppmfile</i>] |
| 19 | |
| 20 | <h2 id="description">DESCRIPTION</h2> |
| 21 | |
| 22 | <p>This program is part of <a href="index.html">Netpbm</a>. |
| 23 | |
| 24 | <p><b>ppmtoascii</b> reads a PPM image as input and produces a somewhat |
| 25 | crude ASCII graphic image as output, with ANSI terminal control characters |
| 26 | so it has crude color when sent to a color text terminal. |
| 27 | |
| 28 | <p>There is no converter for the other direction. |
| 29 | |
| 30 | <p><b>ppmtoterm</b> does a similar thing, but displays each character of the |
| 31 | image as a single pixel (using the same dense character for every pixel), |
| 32 | whereas <b>ppmtoascii</b> combines 2 or 8 pixels into one character, where |
| 33 | the character roughly represents those particular pixels. |
| 34 | |
| 35 | <p>Note that ANSI provides for only eight colors (including black and white). |
| 36 | |
| 37 | <p>Note that an ANSI terminal can't display a single character in multiple |
| 38 | colors, so where a character represents 8 pixels of differing colors, the |
| 39 | color of the character is one that is the average of the colors of those |
| 40 | pixels. |
| 41 | |
| 42 | <p><b>pbmtoascii</b> does the same thing for PBM images, with no terminal |
| 43 | control characters (because none are needed for a strictly black and white |
| 44 | image). |
| 45 | |
| 46 | |
| 47 | <h2 id="options">OPTIONS</h2> |
| 48 | |
| 49 | <p>In addition to the options common to all programs based on libnetpbm |
| 50 | (most notably <b>-quiet</b>, see <a href="index.html#commonoptions"> |
| 51 | Common Options</a>), <b>ppmtoascii</b> recognizes the following |
| 52 | command line options: |
| 53 | |
| 54 | <p>The <b>-1x2</b> and <b>-2x4</b> options give you two alternate ways for the |
| 55 | pixels to get mapped to characters. With <b>1x2</b>, the default, each |
| 56 | character represents a group of 1 pixel across by 2 pixels down. With |
| 57 | <b>-2x4</b>, each character represents 2 pixels across by 4 pixels down. |
| 58 | |
| 59 | <h2 id="seealso">SEE ALSO</h2> |
| 60 | |
| 61 | <a href="pbmtoascii.html">pbmtoascii</a> |
| 62 | <a href="ppmtoterm.html">ppmtoterm</a> |
| 63 | <a href="ppm.html">ppm</a> |
| 64 | |
| 65 | |
| 66 | <h2 id="history">HISTORY</h2> |
| 67 | |
| 68 | <p><b>ppmtoascii</b> was new in Netpbm 10.51 (June 2010). Frank Ch. Eigler |
| 69 | derived it from <b>pbmtoascii</b>. |
| 70 | |
| 71 | |
| 72 | <h2 id="author">AUTHOR</h2> |
| 73 | |
| 74 | Copyright (C) 2010 by Frank Ch. Eigler. |
| 75 | |
| 76 | <hr> |
| 77 | <h2 id="index">Table Of Contents</h2> |
| 78 | <ul> |
| 79 | <li><a href="#synopsis">SYNOPSIS</a> |
| 80 | <li><a href="#description">DESCRIPTION</a> |
| 81 | <li><a href="#options">OPTIONS</a> |
| 82 | <li><a href="#seealso">SEE ALSO</a> |
| 83 | <li><a href="#history">HISTORY</a> |
| 84 | <li><a href="#author">AUTHOR</a> |
| 85 | </ul> |
| 86 | </body> |
| 87 | </html> |