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]
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.  If you don't specify the second file, pnmpaste  reads
26       the base image from Standard Input.
27
28       x  and y specify the location in the base image at which to put the top
29       left corner of the pasted image, x giving the horizontal position and x
30       giving the vertical position.  A nonnegative value indicates the number
31       of pixels right of the right edge or below the top  edge  of  the  base
32       image,  while  a negative value indicates the number of pixels right of
33       the right edge or below the bottom edge (so x = -5 means 5 pixels  left
34       of the right edge).
35
36       If  any  part  of  the pasted image does not fit within the base image,
37       pnmpaste fails.
38
39       This tool is most useful in combination with pamcut.  For instance,  if
40       you  want to edit a small segment of a large image, and your image edi‐
41       tor cannot edit the large image, you can cut out the  segment  you  are
42       interested in, edit it, and then paste it back in.
43
44       Another useful companion tool is pbmmask.
45
46       pamcomp  is  a more general tool, except that it lacks the 'or,' 'and,'
47       and 'xor' functions.  pamcomp allows you to specify an  alpha  mask  in
48       order  to  have  only  part of the inserted image get inserted.  So the
49       inserted pixels need not  be  a  rectangle.   You  can  also  have  the
50       inserted  image  be translucent, so the resulting image is a mixture of
51       the inserted image and the base image.
52
53

OPTIONS

55       The option specifies the operation to use when doing  the  paste.   The
56       default  is -replace, which means to do the obvious paste: replace pix‐
57       els of the 'into' image with those of the 'from' image.
58
59       -and, -or, and -xor are allowed only  if  both  input  images  are  PBM
60       images.  They say to combine the 'from' and 'into' images by performing
61       boolean operations:  Each pixel of the output image is  the  result  of
62       the  boolean  operation  on  the  corresponding pixels of the two input
63       image, where white is TRUE and black is FALSE.
64
65       Note that this is different from what you would  get  by  doing  a  bit
66       arithmetic on the bits in the PBM images, because in PBM, white is rep‐
67       resented by a 0 bit, and 0 in bit arithmetic corresponds  to  FALSE  in
68       boolean arithmetic.
69
70

SEE ALSO

72       pamcomp(1), pamcut(1), pnminvert(1), pnmarith(1), pbmmask(1), pnm(1)
73
74

AUTHOR

76       Copyright (C) 1989, 1991 by Jef Poskanzer.
77
78
79
80netpbm documentation           21 February 1991        Pnmpaste User Manual(0)
Impressum