{
    "content": [
        {
            "type": "text",
            "text": "# pamcut (man)\n\n## NAME\n\npamcut - cut a rectangle out of a PAM, PBM, PGM, or PPM image\n\n## SYNOPSIS\n\npamcut  [-left  leftcol]  [-right  rightcol] [-top toprow] [-bottom bottomrow] [-width width]\n[-height height] [-pad] [-verbose] [ left right width height ] [pnmfile]\nAll options may be abbreviated to the shortest unique prefix.\n\n## DESCRIPTION\n\nReads a PAM, PBM, PGM, or PPM image as input.  Extracts the specified rectangle, and produces\nthe same kind of image as output.\n\n## TLDR\n\n> Cut out a rectangular region from a Netpbm image.\n\n- Discard the specified number of columns/rows on each side of the image:\n  `pamcut {{-cropl|-cropleft}} {{value}} {{-cropr|-cropright}} {{value}} {{-cropt|-croptop}} {{value}} {{-cropb|-cropbottom}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}`\n- Keep only the columns between the specified columns (inclusively):\n  `pamcut {{-l|-left}} {{value}} {{-ri|-right}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}`\n- Fill missing areas with black pixels if the specified rectangle does not entirely lie within the input image:\n  `pamcut {{-t|-top}} {{value}} {{-b|-bottom}} {{value}} -pad {{path/to/image.ppm}} > {{path/to/output.ppm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (3 subsections)\n- **OPTIONS** (8 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pamcut",
        "section": "",
        "mode": "man",
        "summary": "pamcut - cut a rectangle out of a PAM, PBM, PGM, or PPM image",
        "synopsis": "pamcut  [-left  leftcol]  [-right  rightcol] [-top toprow] [-bottom bottomrow] [-width width]\n[-height height] [-pad] [-verbose] [ left right width height ] [pnmfile]\nAll options may be abbreviated to the shortest unique prefix.",
        "tldr_summary": "Cut out a rectangular region from a Netpbm image.",
        "tldr_examples": [
            {
                "description": "Discard the specified number of columns/rows on each side of the image",
                "command": "pamcut {{-cropl|-cropleft}} {{value}} {{-cropr|-cropright}} {{value}} {{-cropt|-croptop}} {{value}} {{-cropb|-cropbottom}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}"
            },
            {
                "description": "Keep only the columns between the specified columns (inclusively)",
                "command": "pamcut {{-l|-left}} {{value}} {{-ri|-right}} {{value}} {{path/to/image.ppm}} > {{path/to/output.ppm}}"
            },
            {
                "description": "Fill missing areas with black pixels if the specified rectangle does not entirely lie within the input image",
                "command": "pamcut {{-t|-top}} {{value}} {{-b|-bottom}} {{value}} -pad {{path/to/image.ppm}} > {{path/to/output.ppm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "ber, it refers to columns numbered from 0 at the left, increasing to the right. If negative, it refers to columns numbered -1 at the right, decreasing to the left."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "for -left."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "refers to rows numbered from 0 at the top, increasing downward. If negative, it refers to columns numbered -1 at the bottom, decreasing upward."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "The row number of the bottom-most row to be in the output, numbered the same as for -top."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "The number of rows to be in the output. Must be positive."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "less you also specify -pad. In that case, it pads the output with black up to the edges you specify. You can use this option if you need to have an image of certain dimensions and have an image of arbitrary dimensions. pnmpad also adds borders to an image, but you specify their width directly."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Print information about the processing to Standard Error."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pnmcrop",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcrop/1/json"
            },
            {
                "name": "pnmpad",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmpad/1/json"
            },
            {
                "name": "pnmcat",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcat/1/json"
            },
            {
                "name": "pgmslice",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pgmslice/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": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": [
                    {
                        "name": "-height",
                        "lines": 5
                    },
                    {
                        "name": "-width -height",
                        "lines": 1
                    },
                    {
                        "name": "-right -bottom",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-left",
                        "lines": 3
                    },
                    {
                        "name": "-right",
                        "lines": 2
                    },
                    {
                        "name": "-top",
                        "lines": 3
                    },
                    {
                        "name": "-bottom",
                        "lines": 3
                    },
                    {
                        "name": "-width",
                        "lines": 1
                    },
                    {
                        "name": "-height",
                        "lines": 2
                    },
                    {
                        "name": "-pad",
                        "lines": 7
                    },
                    {
                        "name": "-verbose",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamcut - cut a rectangle out of a PAM, PBM, PGM, or PPM image\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pamcut  [-left  leftcol]  [-right  rightcol] [-top toprow] [-bottom bottomrow] [-width width]\n[-height height] [-pad] [-verbose] [ left right width height ] [pnmfile]\n\nAll options may be abbreviated to the shortest unique prefix.\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Reads a PAM, PBM, PGM, or PPM image as input.  Extracts the specified rectangle, and produces\nthe same kind of image as output.\n\nThere  are two ways to specify the rectangle to cut: arguments and options.  Options are eas‐\nier to remember and read, more expressive, and allow you to use defaults.  Arguments were the\nonly way available before July 2000.\n\nIf  you  use  both  options and arguments, the two specifications get mixed in an unspecified\nway.\n\nTo use options, just code any mixture of  the  -left,  -right,  -top,  -bottom,  -width,  and",
                "subsections": [
                    {
                        "name": "-height",
                        "content": "specify all three of -left, -right, and -width or -top, -bottom, and -height.\n\nTo use arguments, specify all four of the left, right, width, and height arguments.  left and\ntop  have  the  same effect as specifying them as the argument of a -left or -top option, re‐\nspectively.  width and height have the same effect as specifying them as the  argument  of  a"
                    },
                    {
                        "name": "-width -height",
                        "content": "tive, they have the same effect as specifying one less than the value as the  argument  to  a"
                    },
                    {
                        "name": "-right -bottom",
                        "content": "right edge).  Before July 2000, negative numbers were not allowed for width and height.\n\nInput is from Standard Input if you don't specify the input file pnmfile.\n\nOutput is to Standard Output.\n\nIf you are splitting a single image into multiple same-size images, pamdice  is  faster  than\nrunning pamcut multiple times.\n\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-left",
                        "content": "ber, it refers to columns numbered from 0 at the left, increasing to  the  right.   If\nnegative, it refers to columns numbered -1 at the right, decreasing to the left.\n"
                    },
                    {
                        "name": "-right",
                        "content": "for -left.\n"
                    },
                    {
                        "name": "-top",
                        "content": "refers  to  rows  numbered  from  0  at the top, increasing downward.  If negative, it\nrefers to columns numbered -1 at the bottom, decreasing upward.\n"
                    },
                    {
                        "name": "-bottom",
                        "content": "The row number of the bottom-most row to be in the output, numbered the  same  as  for\n-top.\n"
                    },
                    {
                        "name": "-width",
                        "content": ""
                    },
                    {
                        "name": "-height",
                        "content": "The number of rows to be in the output.  Must be positive.\n"
                    },
                    {
                        "name": "-pad",
                        "content": "less you also specify -pad.  In that case, it pads the output with  black  up  to  the\nedges  you  specify.   You can use this option if you need to have an image of certain\ndimensions and have an image of arbitrary dimensions.\n\npnmpad also adds borders to an image, but you specify their width directly.\n\n"
                    },
                    {
                        "name": "-verbose",
                        "content": "Print information about the processing to Standard Error.\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "pnmcrop(1), pnmpad(1), pnmcat(1), pgmslice(1), pnm(5)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 1989 by Jef Poskanzer.\n\n\n\n03 August 2000                                  pamcut(1)",
                "subsections": []
            }
        }
    }
}