{
    "mode": "man",
    "parameter": "pamfile",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pamfile/1/json",
    "generated": "2026-08-12T05:08:36Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "pamfile - describe a Netpbm (PAM or PNM) file\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "pamfile",
                    "content": "[-allimages] [-comments] [-count] [-machine] [-size]\n\n[file ...]\n\nMinimum  unique  abbreviations of options are acceptable.  You may use double hyphens instead\nof single hyphen to denote options.  You may use white space in place of the equals  sign  to\nseparate an option name from its value.\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npamfile  reads one or more Netpbm files as input and writes out short descriptions of the im‐\nage type, size, etc.  This is partly for use in shell scripts, so the format is not  particu‐\nlarly pretty.\n\nBy  default,  pamfile  reads only the header of the input file.  If that file is a pipe, that\nmight cause problems for the process that is feeding the pipe.  In that case, see the -allim‐\nages option.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pamfile recognizes the following command line options:\n\n\n",
            "subsections": [
                {
                    "name": "-allimages",
                    "content": "This  option  causes pamfile to describe every image in each input file.  Without this\noption, pamfile describes only the first image in each input file.\n\nThis option also causes pamfile to read all the images from the input stream,  whereas\nwithout  it,  pamfile  reads only the header of the first one.  If the input stream is\nfrom a pipe, the process that is feeding the pipe might require the entire  stream  to\nbe  consumed.   In that case, use this option even if the stream contains only one im‐\nage.\n\nThis option has no effect if you also specify -count.\n\nNote that before July 2000, a file could not contain more than one image and many pro‐\ngrams ignore all but the first.\n\nThis option was new in Netpbm 9.5 (July 2000).\n\n"
                },
                {
                    "name": "-comments",
                    "content": "This option causes pamfile to include for each PAM image a report of the comments from\nthe header of the image.\n\nFor a PBM, PGM, or PPM image, pamfile reports there are no  comments,  even  if  there\nare.\n\nThis option was new in Netpbm 10.35 (August 2006).\n\n"
                },
                {
                    "name": "-count",
                    "content": "put file.\n\nAs with -allimages, this causes pamfile to read all the images.\n\nYou may specify at most one of -count, -machine, and -size.\n\nThis option was new with Netpbm 10.31 (December 2005).\n\n"
                },
                {
                    "name": "-machine",
                    "content": "This makes the output more convenient for a machine to use, while\nless convenient for a human.  pamfile reports the same information\nas with no options.\n\nThe output is one line of ASCII text per image.  Each line consists of\nthe file name, followed by a colon, followed by a space, then the\nfollowing tokens with a space in between:\n\n\n\n•      Format: 'PAM', 'PBM', 'PGM', or\n'PPM',\n\n•      Subformat: 'PLAIN' or 'RAW'\n\n•      Width: in pixels, in decimal\n\n•      Height: in pixels, in decimal\n\n•      Depth: in decimal\n\n•      Maxval: in decimal (1 if image is PBM)\n\n•      Tuple type (emulated if the image is not PAM)\n\n\nYou may specify at most one of -count, -machine, and -size.\n\nThis option was new in Netpbm 10.86 (March 2019).\n\n"
                },
                {
                    "name": "-size",
                    "content": "nient for machine processing.\n\nThere is one line of output per image, consisting of two blank-delimited tokens:\n\n\n\n•      Width: in pixels, in decimal\n\n•      Height: in pixels, in decimal\n\n\nNote that there is no way to tell which image is in which file, if you  have  multiple\ninput files with multiple images.  If that is your case, use -machine instead.\n\nYou may specify at most one of -count, -machine, and -size.\n\nThis option was new in Netpbm 10.86 (March 2019).\n\n\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "pam(1), ppmhist(1), file\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1991 by Jef Poskanzer.\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pamfile.html\n\nnetpbm documentation                        04 July 2020                      Pamfile User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pamfile - describe a Netpbm (PAM or PNM) file",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option causes pamfile to describe every image in each input file. Without this option, pamfile describes only the first image in each input file. This option also causes pamfile to read all the images from the input stream, whereas without it, pamfile reads only the header of the first one. If the input stream is from a pipe, the process that is feeding the pipe might require the entire stream to be consumed. In that case, use this option even if the stream contains only one im‐ age. This option has no effect if you also specify -count. Note that before July 2000, a file could not contain more than one image and many pro‐ grams ignore all but the first. This option was new in Netpbm 9.5 (July 2000)."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This option causes pamfile to include for each PAM image a report of the comments from the header of the image. For a PBM, PGM, or PPM image, pamfile reports there are no comments, even if there are. This option was new in Netpbm 10.35 (August 2006)."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "put file. As with -allimages, this causes pamfile to read all the images. You may specify at most one of -count, -machine, and -size. This option was new with Netpbm 10.31 (December 2005)."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "This makes the output more convenient for a machine to use, while less convenient for a human. pamfile reports the same information as with no options. The output is one line of ASCII text per image. Each line consists of the file name, followed by a colon, followed by a space, then the following tokens with a space in between: • Format: 'PAM', 'PBM', 'PGM', or 'PPM', • Subformat: 'PLAIN' or 'RAW' • Width: in pixels, in decimal • Height: in pixels, in decimal • Depth: in decimal • Maxval: in decimal (1 if image is PBM) • Tuple type (emulated if the image is not PAM) You may specify at most one of -count, -machine, and -size. This option was new in Netpbm 10.86 (March 2019)."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "nient for machine processing. There is one line of output per image, consisting of two blank-delimited tokens: • Width: in pixels, in decimal • Height: in pixels, in decimal Note that there is no way to tell which image is in which file, if you have multiple input files with multiple images. If that is your case, use -machine instead. You may specify at most one of -count, -machine, and -size. This option was new in Netpbm 10.86 (March 2019)."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pam",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pam/1/json"
        },
        {
            "name": "ppmhist",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmhist/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Describe Netpbm (PAM or PNM) files.",
        "examples": [
            {
                "description": "Describe the specified Netpbm files",
                "command": "pamfile {{path/to/file1 path/to/file2 ...}}"
            },
            {
                "description": "Describe every image in each input file (as opposed to only the first image in each file) in a machine-readable format",
                "command": "pamfile {{-a|-allimages}} -machine {{path/to/file}}"
            },
            {
                "description": "Display a count on how many images the input files contain",
                "command": "pamfile {{-cou|-count}} {{path/to/file}}"
            }
        ]
    }
}