summary refs log tree commit diff
path: root/ppmtoascii.html
blob: 5384c6fa41caff00f577a71b79c232703cc188f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmtoascii User Manual</title></head>
<body>
<h1>ppmtoascii</h1>
Updated: 09 April 2010
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
ppmtoascii - convert a PPM image to ASCII graphics with ANSI terminal color

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppmtoascii</b>

[<b>-1x2</b>|<b>-2x4</b>]

[<i>ppmfile</i>]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>ppmtoascii</b> reads a PPM image as input and produces a somewhat
crude ASCII graphic image as output, with ANSI terminal control characters
so it has crude color when sent to a color text terminal.

<p>There is no converter for the other direction.

<p><b>ppmtoterm</b> does a similar thing, but displays each character of the
image as a single pixel (using the same dense character for every pixel),
whereas <b>ppmtoascii</b> combines 2 or 8 pixels into one character, where
the character roughly represents those particular pixels.

<p>Note that ANSI provides for only eight colors (including black and white).

<p>Note that an ANSI terminal can't display a single character in multiple
colors, so where a character represents 8 pixels of differing colors, the
color of the character is one that is the average of the colors of those
pixels.

<p><b>pbmtoascii</b> does the same thing for PBM images, with no terminal
control characters (because none are needed for a strictly black and white
image).


<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmtoascii</b> recognizes the following
command line options:

<p>The <b>-1x2</b> and <b>-2x4</b> options give you two alternate ways for the
pixels to get mapped to characters.  With <b>1x2</b>, the default, each
character represents a group of 1 pixel across by 2 pixels down.  With
<b>-2x4</b>, each character represents 2 pixels across by 4 pixels down.

<h2 id="seealso">SEE ALSO</h2>

<a href="pbmtoascii.html">pbmtoascii</a>
<a href="ppmtoterm.html">ppmtoterm</a>
<a href="ppm.html">ppm</a>


<h2 id="history">HISTORY</h2>

<p><b>ppmtoascii</b> was new in Netpbm 10.51 (June 2010).  Frank Ch. Eigler
derived it from <b>pbmtoascii</b>.


<h2 id="author">AUTHOR</h2>

Copyright (C) 2010 by Frank Ch. Eigler.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>