summaryrefslogtreecommitdiffstats
path: root/upstream/fedora-40/man1/ppmtoascii.1
blob: b3a3269b7f68eca132e4eef68ab6c970ed8034b6 (plain)
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
88
89
90
91
92
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Ppmtoascii User Manual" 0 "09 April 2010" "netpbm documentation"

.SH NAME
ppmtoascii - convert a PPM image to ASCII graphics with ANSI terminal color

.UN synopsis
.SH SYNOPSIS

\fBppmtoascii\fP

[\fB-1x2\fP|\fB-2x4\fP]

[\fIppmfile\fP]

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBppmtoascii\fP 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.
.PP
There is no converter for the other direction.
.PP
\fBppmtoterm\fP does a similar thing, but displays each character of the
image as a single pixel (using the same dense character for every pixel),
whereas \fBppmtoascii\fP combines 2 or 8 pixels into one character, where
the character roughly represents those particular pixels.
.PP
Note that ANSI provides for only eight colors (including black and white).
.PP
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.
.PP
\fBpbmtoascii\fP does the same thing for PBM images, with no terminal
control characters (because none are needed for a strictly black and white
image).


.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBppmtoascii\fP recognizes the following
command line options:
.PP
The \fB-1x2\fP and \fB-2x4\fP options give you two alternate ways for the
pixels to get mapped to characters.  With \fB1x2\fP, the default, each
character represents a group of 1 pixel across by 2 pixels down.  With
\fB-2x4\fP, each character represents 2 pixels across by 4 pixels down.

.UN seealso
.SH SEE ALSO
.BR "pbmtoascii" (1)\c
\&
.BR "ppmtoterm" (1)\c
\&
.BR "ppm" (1)\c
\&


.UN history
.SH HISTORY
.PP
\fBppmtoascii\fP was new in Netpbm 10.51 (June 2010).  Frank Ch. Eigler
derived it from \fBpbmtoascii\fP.


.UN author
.SH AUTHOR

Copyright (C) 2010 by Frank Ch. Eigler.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/ppmtoascii.html
.PP