The flags specify the operation to use when doing the paste. The default is replace. The other operations act as if white is 1 and black is 0.
All flags can be abbreviated to their shortest unique prefix.
This tool is useful in combination with pnmcut(1). For instance, if you want to edit a small segment of a large bitmap, and your bitmap editor is TOO STUPID to edit the large bitmap, you can cut out the segment you are interested in, edit it, and then paste it back in.
Another useful companion tool is pbmmask(1).
The pnmpaste(1) tool is like this one, except that it doesn't implement the logical operation flags -- since they don't have any useful meaning for grayscale and color images.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.