1Pnmpaste User Manual(0)                                Pnmpaste User Manual(0)
2
3
4

NAME

6       pnmpaste - paste a rectangle into a PNM image
7
8

SYNOPSIS

10       pnmpaste
11
12       [-replace | -or | -and | -xor | -nor | -nand | -nxor]
13
14       frompnmfile x y [intopnmfile]
15
16       You can abbreviate all options to their shortest unique prefix.
17
18

DESCRIPTION

20       This program is part of Netpbm(1).
21
22       pnmpaste reads two PNM images as input and inserts the first image (the
23       "pasted image") into the second (the "base  image")  at  the  specified
24       location,  and  produces a PNM image the same size and type as the base
25       image as output.
26
27       Either file name argument (but not both) may be '-' to  indicate  Stan‐
28       dard  Input.   If  you  don't  specify the second file argument at all,
29       that's the same as '-'.
30
31       x and y specify the location in the base image at which to put the  top
32       left corner of the pasted image, x giving the horizontal position and x
33       giving the vertical position.  A nonnegative value indicates the number
34       of  pixels  right  of  the right edge or below the top edge of the base
35       image, while a negative value indicates the number of pixels  right  of
36       the  right edge or below the bottom edge (so x = -5 means 5 pixels left
37       of the right edge).
38
39       If any part of the pasted image does not fit  within  the  base  image,
40       pnmpaste fails.
41
42       This  tool is most useful in combination with pamcut.  For instance, if
43       you want to edit a small segment of a large image, and your image  edi‐
44       tor  cannot  edit  the large image, you can cut out the segment you are
45       interested in, edit it, and then paste it back in.
46
47       Another useful companion tool is pbmmask.
48
49       pamcomp is a more general tool, except that it lacks the  "or,"  "and,"
50       and "xor" functions.  pamcomp allows you to specify a transparency mask
51       in order to have only part of the inserted image get inserted.  So  the
52       inserted  pixels  need  not  be  a  rectangle.   You  can also have the
53       inserted image be translucent, so the resulting image is a  mixture  of
54       the inserted image and the base image.
55
56

OPTIONS

58       In  addition  to  the options common to all programs based on libnetpbm
59       (most notably -quiet, see
60        Common Options ⟨index.html#commonoptions⟩ ), pnmpaste  recognizes  the
61       following command line options:
62
63
64
65       -replace, -or, -and, -xor,
66              -nor, -nand, -nxor
67
68              These  option specify the operation to use when doing the paste.
69              The default is -replace, which means to do  the  obvious  paste:
70              replace  pixels  of  the  "into"  image with those of the "from"
71              image.
72
73              -and, -nand, -or, -nor, -xor, and nxor are allowed only if  both
74              input images are PBM images.  They say to combine the "from" and
75              "into" images by performing boolean operations:  Each  pixel  of
76              the  output  image is the result of the boolean operation on the
77              corresponding pixels of the two input  images,  where  white  is
78              TRUE and black is FALSE.
79
80              Note  that  this is different from what you would get by doing a
81              bit arithmetic on the bits in the PBM images,  because  in  PBM,
82              white  is represented by a 0 bit, and 0 in bit arithmetic corre‐
83              sponds to FALSE in boolean arithmetic.
84
85              -nand, -nor, and -nxor were new in Netpbm 10.85 (December 2018).
86
87
88
89

SEE ALSO

91       pamcomp(1), pamcut(1), pnminvert(1), pnmarith(1), pbmmask(1), pnm(1)
92
93

AUTHOR

95       Copyright (C) 1989, 1991 by Jef Poskanzer.
96

DOCUMENT SOURCE

98       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
99       source.  The master documentation is at
100
101              http://netpbm.sourceforge.net/doc/pnmpaste.html
102
103netpbm documentation           16 December 2018        Pnmpaste User Manual(0)
Impressum