| 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 "Pnmpaste User Manual" 1 "16 December 2018" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
|
| 10 |
pnmpaste - paste a rectangle into a PNM image |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBpnmpaste\fP |
| 16 |
|
| 17 |
[\fB-replace\fP | \fB-or\fP | \fB-and\fP | \fB-xor\fP | |
| 18 |
\fB-nor\fP | \fB-nand\fP | \fB-nxor\fP] |
| 19 |
|
| 20 |
\fIfrompnmfile\fP \fIx\fP \fIy\fP |
| 21 |
[\fIintopnmfile\fP] |
| 22 |
.PP |
| 23 |
You can abbreviate all options to their shortest unique prefix. |
| 24 |
|
| 25 |
.UN description |
| 26 |
.SH DESCRIPTION |
| 27 |
.PP |
| 28 |
This program is part of |
| 29 |
.BR "Netpbm" (1)\c |
| 30 |
\&. |
| 31 |
.PP |
| 32 |
\fBpnmpaste\fP reads two PNM images as input and inserts the first |
| 33 |
image (the "pasted image") into the second (the "base image") at the |
| 34 |
specified location, and produces a PNM image the same size and type as |
| 35 |
the base image as output. |
| 36 |
.PP |
| 37 |
Either file name argument (but not both) may be '-' to indicate |
| 38 |
Standard Input. If you don't specify the second file argument at all, that's |
| 39 |
the same as '-'. |
| 40 |
.PP |
| 41 |
\fIx\fP and \fIy\fP specify the location in the base image at |
| 42 |
which to put the top left corner of the pasted image, \fIx\fP giving |
| 43 |
the horizontal position and \fIx\fP giving the vertical position. A |
| 44 |
nonnegative value indicates the number of pixels right of the right |
| 45 |
edge or below the top edge of the base image, while a negative value |
| 46 |
indicates the number of pixels right of the right edge or below the |
| 47 |
bottom edge (so x = -5 means 5 pixels left of the right edge). |
| 48 |
.PP |
| 49 |
If any part of the pasted image does not fit within the base image, |
| 50 |
\fBpnmpaste\fP fails. |
| 51 |
.PP |
| 52 |
This tool is most useful in combination with \fIpamcut\fP. For |
| 53 |
instance, if you want to edit a small segment of a large image, and |
| 54 |
your image editor cannot edit the large image, you can cut out the |
| 55 |
segment you are interested in, edit it, and then paste it back in. |
| 56 |
.PP |
| 57 |
Another useful companion tool is \fBpbmmask\fP. |
| 58 |
.PP |
| 59 |
\fBpamcomp\fP is a more general tool, except that it lacks the |
| 60 |
"or," "and," and "xor" functions. |
| 61 |
\fBpamcomp\fP allows you to specify a transparency mask in order to have |
| 62 |
only part of the inserted image get inserted. So the inserted pixels |
| 63 |
need not be a rectangle. You can also have the inserted image be |
| 64 |
translucent, so the resulting image is a mixture of the inserted image |
| 65 |
and the base image. |
| 66 |
|
| 67 |
.UN options |
| 68 |
.SH OPTIONS |
| 69 |
.PP |
| 70 |
In addition to the options common to all programs based on libnetpbm |
| 71 |
(most notably \fB-quiet\fP, see |
| 72 |
.UR index.html#commonoptions |
| 73 |
Common Options |
| 74 |
.UE |
| 75 |
\&), \fBpnmpaste\fP recognizes the following |
| 76 |
command line options: |
| 77 |
|
| 78 |
|
| 79 |
.TP |
| 80 |
\fB-replace\fP, \fB-or\fP, \fB-and\fP, \fB-xor\fP, |
| 81 |
\fB-nor\fP, \fB-nand\fP, \fB-nxor\fP |
| 82 |
.sp |
| 83 |
These option specify the operation to use when doing the paste. |
| 84 |
The default is \fB-replace\fP, which means to do the obvious paste: |
| 85 |
replace pixels of the "into" image with those of the |
| 86 |
"from" image. |
| 87 |
.sp |
| 88 |
\fB-and\fP, \fB-nand\fP, \fB-or\fP, \fB-nor\fP, \fB-xor\fP, |
| 89 |
and \fBnxor\fP are allowed only if both input images are PBM images. They |
| 90 |
say to combine the "from" and "into" images by performing boolean operations: |
| 91 |
Each pixel of the output image is the result of the boolean operation on the |
| 92 |
corresponding pixels of the two input images, where white is TRUE and black |
| 93 |
is FALSE. |
| 94 |
.sp |
| 95 |
Note that this is different from what you would get by doing a bit |
| 96 |
arithmetic on the bits in the PBM images, because in PBM, white is |
| 97 |
represented by a 0 bit, and 0 in bit arithmetic corresponds to FALSE |
| 98 |
in boolean arithmetic. |
| 99 |
.sp |
| 100 |
\fB-nand\fP, \fB-nor\fP, and \fB-nxor\fP were new in Netpbm 10.85 |
| 101 |
(December 2018). |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
.UN seealso |
| 106 |
.SH SEE ALSO |
| 107 |
.BR "pamcomp" (1)\c |
| 108 |
\&, |
| 109 |
.BR "pamcut" (1)\c |
| 110 |
\&, |
| 111 |
.BR "pnminvert" (1)\c |
| 112 |
\&, |
| 113 |
.BR "pnmarith" (1)\c |
| 114 |
\&, |
| 115 |
.BR "pbmmask" (1)\c |
| 116 |
\&, |
| 117 |
.BR "pnm" (1)\c |
| 118 |
\& |
| 119 |
|
| 120 |
.UN author |
| 121 |
.SH AUTHOR |
| 122 |
|
| 123 |
Copyright (C) 1989, 1991 by Jef Poskanzer. |
| 124 |
.SH DOCUMENT SOURCE |
| 125 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 126 |
source. The master documentation is at |
| 127 |
.IP |
| 128 |
.B http://netpbm.sourceforge.net/doc/pnmpaste.html |
| 129 |
.PP |