summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-leap-15-6/man1/asciitopgm.1
blob: d32f8b2834f25ebfe95d82f87f0a5622cc238555 (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
\
.\" 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 "Asciitopgm User Manual" 0 "20 January 2011" "netpbm documentation"

.SH NAME
asciitopgm - convert ASCII graphics into a PGM

.UN synopsis
.SH SYNOPSIS

\fBasciitopgm\fP
[\fB-d\fP \fIdivisor\fP] \fIheight\fP \fIwidth\fP [\fIasciifile\fP]

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBasciitopgm\fP reads ASCII data as input and produces a PGM image
with pixel values which are an approximation of the
"brightness" of the ASCII characters, assuming
black-on-white printing.  In other words, a capital M is very dark, a
period is very light, and a space is white.
.PP
Obviously, \fBasciitopgm\fP assumes a certain font in assigning
a brightness value to a character.
.PP
\fBasciitopgm\fP considers ASCII control characters to be all white.  For
a lower case character, It assigns a special brightnesses which has nothing to
do with what it looks like printed.
\fBasciitopgm\fP takes the ASCII character code from the lower 7 bits
of each input byte.  But it warns you if the most significant bit of
any input byte is not zero.
.PP
The output image is \fIheight\fP pixels high by \fIwidth\fP pixels wide,
truncating and padding with white on the right and bottom as necessary.
.PP
The \fIdivisor\fP value is an integer (decimal) by which the
blackness of an input character is divided; the default value is 1.
You can use this to adjust the brightness of the output: for example,
if the image is too bright, increase the divisor.
.PP
In a sort of reminiscence of Fortran line printer carriage control,
where a line starts with \fB+\fP (plus), \fBasciitopgm\fP combines it
with the previous row of output instead of generating a new row.  This
allows a larger range of gray values.  (In Fortran carriage control, the
first character of every line sent to the printer tells how much to advance
the paper, with \fB+\fP meaning not at all, so that the rest of the
characters on the line overstrike the ones already on the paper.  What
\fBasciitopgm\fP does is rather different in that \fBasciitopgm\fP does not
reserve the first character of every line that way.  If the first character is
anything but \fB+\fP, \fBasciitopgm\fP considers it just to be first
character of the image.
.PP
If you're looking for something that creates an image of text,
with that text specified in ASCII, that is something quite different.
Use \fBpbmtext\fP for that.

.UN seealso
.SH SEE ALSO
.BR "pbmtoascii" (1)\c
\&,
.BR "pbmtext" (1)\c
\&,
.BR "pgm" (5)\c
\&

.UN author
.SH AUTHOR

Wilson H. Bent. Jr. (\fIwhb@usc.edu\fP)
.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/asciitopgm.html
.PP