1Asciitopgm User Manual(0) Asciitopgm User Manual(0)
2
3
4
6 asciitopgm - convert ASCII graphics into a PGM
7
8
10 asciitopgm [-d divisor] height width [asciifile]
11
12
14 This program is part of Netpbm(1).
15
16 asciitopgm reads ASCII data as input and produces a PGM image with
17 pixel values which are an approximation of the "brightness" of the
18 ASCII characters, assuming black-on-white printing. In other words, a
19 capital M is very dark, a period is very light, and a space is white.
20
21 Obviously, asciitopgm assumes a certain font in assigning a brightness
22 value to a character.
23
24 asciitopgm considers ASCII control characters to be all white. For a
25 lower case character, It assigns a special brightnesses which has noth‐
26 ing to do with what it looks like printed. asciitopgm takes the ASCII
27 character code from the lower 7 bits of each input byte. But it warns
28 you if the most significant bit of any input byte is not zero.
29
30 The output image is height pixels high by width pixels wide, truncating
31 and padding with white on the right and bottom as necessary.
32
33 The divisor value is an integer (decimal) by which the blackness of an
34 input character is divided; the default value is 1. You can use this
35 to adjust the brightness of the output: for example, if the image is
36 too bright, increase the divisor.
37
38 In a sort of reminiscence of Fortran line printer carriage control,
39 where a line starts with + (plus), asciitopgm combines it with the pre‐
40 vious row of output instead of generating a new row. This allows a
41 larger range of gray values. (In Fortran carriage control, the first
42 character of every line sent to the printer tells how much to advance
43 the paper, with + meaning not at all, so that the rest of the charac‐
44 ters on the line overstrike the ones already on the paper. What asci‐
45 itopgm does is rather different in that asciitopgm does not reserve the
46 first character of every line that way. If the first character is any‐
47 thing but +, asciitopgm considers it just to be first character of the
48 image.
49
50 If you're looking for something that creates an image of text, with
51 that text specified in ASCII, that is something quite different. Use
52 pbmtext for that.
53
54
56 pbmtoascii(1), pbmtext(1), pgm(1)
57
58
60 Wilson H. Bent. Jr. (whb@usc.edu)
61
63 This manual page was generated by the Netpbm tool 'makeman' from HTML
64 source. The master documentation is at
65
66 http://netpbm.sourceforge.net/doc/asciitopgm.html
67
68netpbm documentation 20 January 2011 Asciitopgm User Manual(0)