| 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 "20 January 2011" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
asciitopgm - convert ASCII graphics into a PGM |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBasciitopgm\fP |
| 15 |
[\fB-d\fP \fIdivisor\fP] \fIheight\fP \fIwidth\fP [\fIasciifile\fP] |
| 16 |
|
| 17 |
.UN description |
| 18 |
.SH DESCRIPTION |
| 19 |
.PP |
| 20 |
This program is part of |
| 21 |
.BR "Netpbm" (1)\c |
| 22 |
\&. |
| 23 |
.PP |
| 24 |
\fBasciitopgm\fP reads ASCII data as input and produces a PGM image |
| 25 |
with pixel values which are an approximation of the |
| 26 |
"brightness" of the ASCII characters, assuming |
| 27 |
black-on-white printing. In other words, a capital M is very dark, a |
| 28 |
period is very light, and a space is white. |
| 29 |
.PP |
| 30 |
Obviously, \fBasciitopgm\fP assumes a certain font in assigning |
| 31 |
a brightness value to a character. |
| 32 |
.PP |
| 33 |
\fBasciitopgm\fP considers ASCII control characters to be all white. For |
| 34 |
a lower case character, It assigns a special brightnesses which has nothing to |
| 35 |
do with what it looks like printed. |
| 36 |
\fBasciitopgm\fP takes the ASCII character code from the lower 7 bits |
| 37 |
of each input byte. But it warns you if the most significant bit of |
| 38 |
any input byte is not zero. |
| 39 |
.PP |
| 40 |
The output image is \fIheight\fP pixels high by \fIwidth\fP pixels wide, |
| 41 |
truncating and padding with white on the right and bottom as necessary. |
| 42 |
.PP |
| 43 |
The \fIdivisor\fP value is an integer (decimal) by which the |
| 44 |
blackness of an input character is divided. You can use this to |
| 45 |
adjust the brightness of the output: for example, if the image is too |
| 46 |
bright, increase the divisor. |
| 47 |
.PP |
| 48 |
In a sort of reminiscence of Fortran line printer carriage control, |
| 49 |
where a line starts with \fB+\fP (plus), \fBasciitopgm\fP combines it |
| 50 |
with the previous row of output instead of generating a new row. This |
| 51 |
allows a larger range of gray values. (In Fortran carriage control, the |
| 52 |
first character of every line sent to the printer tells how much to advance |
| 53 |
the paper, with \fB+\fP meaning not at all, so that the rest of the |
| 54 |
characters on the line overstrike the ones already on the paper. What |
| 55 |
\fBasciitopgm\fP does is rather different in that \fBasciitopgm\fP does not |
| 56 |
reserve the first character of every line that way. If the first character is |
| 57 |
anything but \fB+\fP, \fBasciitopgm\fP considers it just to be first |
| 58 |
character of the image. |
| 59 |
.PP |
| 60 |
If you're looking for something that creates an image of text, |
| 61 |
with that text specified in ASCII, that is something quite different. |
| 62 |
Use \fBpbmtext\fP for that. |
| 63 |
|
| 64 |
.UN options |
| 65 |
.SH OPTIONS |
| 66 |
.PP |
| 67 |
In addition to the options common to all programs based on libnetpbm |
| 68 |
(most notably \fB-quiet\fP, see |
| 69 |
.UR index.html#commonoptions |
| 70 |
Common Options |
| 71 |
.UE |
| 72 |
\&), \fBasciitopgm\fP recognizes the following |
| 73 |
command line option: |
| 74 |
|
| 75 |
|
| 76 |
.TP |
| 77 |
\fB-d\fP \fIdivisor\fP |
| 78 |
Specify the value by which the blackness of an input character is |
| 79 |
divided. This is an integer value. Default value is 1. Larger |
| 80 |
values produce darker output images. |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
.UN seealso |
| 85 |
.SH SEE ALSO |
| 86 |
.BR "pbmtoascii" (1)\c |
| 87 |
\&, |
| 88 |
.BR "pbmtext" (1)\c |
| 89 |
\&, |
| 90 |
.BR "pgm" (1)\c |
| 91 |
\& |
| 92 |
|
| 93 |
.UN author |
| 94 |
.SH AUTHOR |
| 95 |
|
| 96 |
Wilson H. Bent. Jr. (\[email protected]\fP) |
| 97 |
.SH DOCUMENT SOURCE |
| 98 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 99 |
source. The master documentation is at |
| 100 |
.IP |
| 101 |
.B http://netpbm.sourceforge.net/doc/asciitopgm.html |
| 102 |
.PP |