Debian Codegraph @

upstream/debian-unstable/man1/asciitopgm.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Asciitopgm User Manual" 1 "15 January 2026" "netpbm documentation"
7
8 .SH NAME
9 asciitopgm - convert ASCII graphics into a PGM
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 .nf
15 \fBasciitopgm\fP
16 [\fB-divisor=\fP\fIinteger\fP]
17 \fIheight\fP \fIwidth\fP [\fIasciifile\fP]
18
19
20 .fi
21 .PP
22 Minimum unique abbreviation of option is acceptable. You may use
23 double hyphens instead of single hyphen to denote options. You may use
24 white space in place of the equals sign to separate an option name
25 from its value.
26
27 .UN description
28 .SH DESCRIPTION
29 .PP
30 This program is part of
31 .BR "Netpbm" (1)\c
32 \&.
33 .PP
34 \fBasciitopgm\fP converts a text grayscale image to PGM. A text grayscale
35 image is a way that people generated a grayscale graphical image with a black
36 on white text printer in the early days. Each character printed is one
37 pixel. A large character such as a capital M is a dark pixel, while a
38 small character such as a period is a light pixel. A space is a fully white
39 pixel. The viewer stands far back from the printed page so as to blur the
40 text and sees a grayscale image. A common novelty use of the technique was to
41 print out a photograph of a person's face in text.
42 .PP
43 Obviously, \fBasciitopgm\fP assumes a certain font in assigning a
44 brightness value to a character.
45 .PP
46 \fBasciitopgm\fP considers ASCII control characters to be all white
47 (except for newline, which is never a pixel but rather indicates the end of a
48 raster row as you would expect). For a lower case character, It assigns a
49 special brightnesses which has nothing to do with what it looks like printed.
50 .PP
51 \fBasciitopgm\fP takes the ASCII character code from the lower 7 bits of
52 each input byte. But it warns you if the most significant bit of any input
53 byte is not zero.
54 .PP
55 The output image is \fIheight\fP pixels high by \fIwidth\fP pixels wide,
56 truncating and padding with white on the right and bottom as necessary.
57 .PP
58 In a sort of reminiscence of Fortran line printer carriage control,
59 where a line starts with \fB+\fP (plus), \fBasciitopgm\fP combines it
60 with the previous row of output instead of generating a new row. This
61 allows a larger range of gray values. (In Fortran carriage control, the
62 first character of every line sent to the printer tells how much to advance
63 the paper, with \fB+\fP meaning not at all, so that the rest of the
64 characters on the line overstrike the ones already on the paper. What
65 \fBasciitopgm\fP does is rather different in that \fBasciitopgm\fP does not
66 reserve the first character of every line that way. If the first character is
67 anything but \fB+\fP, \fBasciitopgm\fP considers it just to be the first
68 character of the image.
69 .PP
70 The maxval of the output image is 127.
71 .PP
72 If you're looking for something that creates an image of text,
73 with that text specified in ASCII, that is something quite different.
74 Use \fBpbmtext\fP for that.
75
76
77 .UN options
78 .SH OPTIONS
79 .PP
80 In addition to the options common to all programs based on libnetpbm
81 (most notably \fB-quiet\fP, see
82 .UR index.html#commonoptions
83 Common Options
84 .UE
85 \&), \fBasciitopgm\fP recognizes the following
86 command line option:
87
88
89 .TP
90 \fB-divisor=\fP\fIinteger\fP
91 Specify the value by which the blackness of an input character is divided.
92 This is an integer value. Larger values produce brighter output images.
93 .sp
94 The value must be positive.
95 .sp
96 The default value is 1.
97 .sp
98 You can use this to adjust the brightness of the output: for example, if
99 the image is too dark, increase the divisor.
100 .sp
101 Before Netpbm 11.14 (March 2006), this must be abbreviated \fB-d\fP,
102 separated from its value by a space and not an equals sign, and appear before
103 the non-option arguments.
104
105
106
107 .UN seealso
108 .SH SEE ALSO
109 .BR "pbmtoascii" (1)\c
110 \&,
111 .BR "pbmtext" (1)\c
112 \&,
113 .BR "pgm" (1)\c
114 \&
115
116 .UN author
117 .SH AUTHOR
118
119 Wilson H. Bent. Jr. (\[email protected]\fP)
120 .SH DOCUMENT SOURCE
121 This manual page was generated by the Netpbm tool 'makeman' from HTML
122 source. The master documentation is at
123 .IP
124 .B http://netpbm.sourceforge.net/doc/asciitopgm.html
125 .PP