# pamfile - man(1) - [phpMan]

> **TLDR:** Describe Netpbm (PAM or PNM) files.
>
- Describe the specified Netpbm files:
  `pamfile {{path/to/file1 path/to/file2 ...}}`
- Describe every image in each input file (as opposed to only the first image in each file) in a machine-readable format:
  `pamfile {{-a|-allimages}} -machine {{path/to/file}}`
- Display a count on how many images the input files contain:
  `pamfile {{-cou|-count}} {{path/to/file}}`

*Source: tldr-pages*

---

_Pamfile_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)                 General Commands Manual                _Pamfile_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)

## NAME
       pamfile - describe a Netpbm (PAM or PNM) file


## SYNOPSIS
### pamfile

       [**-allimages**] [**-comments**] [**-count**] [**-machine**] [**-size**]

       [_file_ ...]

       Minimum  unique  abbreviations of options are acceptable.  You may use double hyphens instead
       of single hyphen to denote options.  You may use white space in place of the equals  sign  to
       separate an option name from its value.


## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pamfile  **reads one or more Netpbm files as input and writes out short descriptions of the im‐
       age type, size, etc.  This is partly for use in shell scripts, so the format is not  particu‐
       larly pretty.

       By  default,  **pamfile  **reads only the header of the input file.  If that file is a pipe, that
       might cause problems for the process that is feeding the pipe.  In that case, see the **-allim‐**
       **ages **option.


## OPTIONS
       In addition to the options common to all programs based on libnetpbm  (most  notably  **-quiet**,
       see [ Common Options](index.html#commonoptions) ), **pamfile **recognizes the following command line options:



### -allimages
              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).


### -comments
              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).


### -count 
              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).


### -machine
              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).


### -size  
              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).




## SEE ALSO
       [**pam**(1)](https://www.chedong.com/phpMan.php/man/pam/1/markdown), [**ppmhist**(1)](https://www.chedong.com/phpMan.php/man/ppmhist/1/markdown), **file**


## AUTHOR
       Copyright (C) 1991 by Jef Poskanzer.

## DOCUMENT SOURCE
       This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pamfile.html>**

netpbm documentation                        04 July 2020                      _Pamfile_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
