LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pamfile

displays image file information

TLDR

Show image info
$ pamfile [image.pam]
copy
Machine-readable output
$ pamfile -machine [image.pam]
copy
Show only image dimensions
$ pamfile -size [image.pam]
copy
Count images in a multi-image file
$ pamfile -count [image.pam]
copy
Describe all images in a multi-image file
$ pamfile -allimages [image.pam]
copy
Show multiple files
$ pamfile [image1.pam] [image2.pam]
copy

SYNOPSIS

pamfile [-allimages] [-comments] [-count] [-machine] [-size] [file...]

DESCRIPTION

pamfile reads one or more Netpbm image files and writes out short descriptions of the image type, dimensions, depth, maxval, and format. It supports PAM, PBM, PGM, and PPM formats. Part of the Netpbm suite.At most one of -count, -machine, or -size may be specified.

PARAMETERS

FILE

PAM/PNM image file(s). Reads from stdin if not specified.
-allimages
Describe every image in each input file, not just the first.
-comments
Include comments from the header of PAM images.
-count
Display only a count of how many images are in each input file.
-machine
Machine-parseable output. Reports format, subformat, width, height, depth, maxval, and tuple type as space-separated tokens, one line per image.
-size
Output only the width and height of the image, space-separated.

CAVEATS

The -comments option only works for PAM images; for PBM, PGM, or PPM images it reports no comments even if present. Without -allimages, only the first image in each file is described.

SEE ALSO

pnmfile(1), file(1), netpbm(1)

Copied to clipboard
Kai