\ .\" 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" 1 "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. 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 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 \&), \fBasciitopgm\fP recognizes the following command line option: .TP \fB-d\fP \fIdivisor\fP Specify the value by which the blackness of an input character is divided. This is an integer value. Default value is 1. Larger values produce darker output images. .UN seealso .SH SEE ALSO .BR "pbmtoascii" (1)\c \&, .BR "pbmtext" (1)\c \&, .BR "pgm" (1)\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