{
    "content": [
        {
            "type": "text",
            "text": "# pnmpaste (man)\n\n## NAME\n\npnmpaste - paste a rectangle into a portable anymap\n\n## SYNOPSIS\n\npnmpaste [-replace|-or|-and |-xor] frompnmfile x y [intopnmfile]\n\n## DESCRIPTION\n\nReads  two portable anymaps as input.  Inserts the first anymap into the second at the speci‐\nfied location, and produces a portable anymap the same size as the second as output.  If  the\nsecond anymap is not specified, it is read from stdin.  The x and y can be negative, in which\ncase they are interpreted relative to the right and bottom of the anymap, respectively.\n\n## TLDR\n\n> Paste a PNM image into another PNM image.\n\n- Paste a PNM image into another PNM image at the specified coordinates:\n  `pnmpaste {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}`\n- Paste the image read from `stdin` into the specified image:\n  `{{command}} | pnmpaste {{x}} {{y}} {{path/to/image.pnm}} > {{path/to/output.pnm}}`\n- Combine the overlapping pixels by the specified boolean operation, where white pixels represent `true` while black pixels represent `false`:\n  `pnmpaste -{{and|nand|or|nor|xor|xnor}} {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pnmpaste",
        "section": "",
        "mode": "man",
        "summary": "pnmpaste - paste a rectangle into a portable anymap",
        "synopsis": "pnmpaste [-replace|-or|-and |-xor] frompnmfile x y [intopnmfile]",
        "tldr_summary": "Paste a PNM image into another PNM image.",
        "tldr_examples": [
            {
                "description": "Paste a PNM image into another PNM image at the specified coordinates",
                "command": "pnmpaste {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Paste the image read from `stdin` into the specified image",
                "command": "{{command}} | pnmpaste {{x}} {{y}} {{path/to/image.pnm}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Combine the overlapping pixels by the specified boolean operation, where white pixels represent `true` while black pixels represent `false`",
                "command": "pnmpaste -{{and|nand|or|nor|xor|xnor}} {{x}} {{y}} {{path/to/image1.pnm}} {{path/to/image2.pnm}} > {{path/to/output.pnm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "pnmcomp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcomp/1/json"
            },
            {
                "name": "pnmcut",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcut/1/json"
            },
            {
                "name": "pnminvert",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnminvert/1/json"
            },
            {
                "name": "pnmarith",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmarith/1/json"
            },
            {
                "name": "pbmmask",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pbmmask/1/json"
            },
            {
                "name": "pnm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pnmpaste - paste a rectangle into a portable anymap\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pnmpaste [-replace|-or|-and |-xor] frompnmfile x y [intopnmfile]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Reads  two portable anymaps as input.  Inserts the first anymap into the second at the speci‐\nfied location, and produces a portable anymap the same size as the second as output.  If  the\nsecond anymap is not specified, it is read from stdin.  The x and y can be negative, in which\ncase they are interpreted relative to the right and bottom of the anymap, respectively.\n\nThis tool is most useful in combination with pnmcut.  For instance, if you  want  to  edit  a\nsmall  segment  of  a large image, and your image editor cannot edit the large image, you can\ncut out the segment you are interested in, edit it, and then paste it back in.\n\nAnother useful companion tool is pbmmask.\n\npnmcomp is, a more general tool, except that it lacks the \"or,\" \"and,\" and  \"xor\"  functions.\npnmcomp  allows you to specify an alpha mask in order to have only part of the inserted image\nget inserted.  So the inserted pixels need not be a rectangle.  You can  also  have  the  in‐\nserted  image  be  translucent, so the resulting image is a mixture of the inserted image and\nthe base image.\n\n\nThe optional flag specifies the operation to use when doing the paste.  The default  is  -re‐‐\nplace.   The  other,  logical  operations  are only allowed if both input images are bitmaps.\nThese operations act as if white is TRUE and black is FALSE.\n\nAll flags can be abbreviated to their shortest unique prefix.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pnmcomp(1), pnmcut(1), pnminvert(1), pnmarith(1), pbmmask(1), pnm(5)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\n\n\n\n21 February 1991                               pnmpaste(1)",
                "subsections": []
            }
        }
    }
}