summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man1/pamfile.1
blob: 0ff2b11d42ed9c37c4cabe1756938770e5a538ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pamfile User Manual" 1 "04 July 2020" "netpbm documentation"

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

.UN synopsis
.SH SYNOPSIS

\fBpamfile\fP

[\fB-allimages\fP]
[\fB-comments\fP]
[\fB-count\fP]
[\fB-machine\fP]
[\fB-size\fP]

[\fIfile\fP ...]
.PP
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.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamfile\fP reads one or more Netpbm files as input and writes
out short descriptions of the image type, size, etc.  This is partly
for use in shell scripts, so the format is not particularly pretty.
.PP
By default, \fBpamfile\fP 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 \fB-allimages\fP option.

.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBpamfile\fP recognizes the following
command line options:


.TP
\fB-allimages\fP
This option causes \fBpamfile\fP to describe every image in each
input file.  Without this option, \fBpamfile\fP describes only the
first image in each input file.
.sp
This option also causes \fBpamfile\fP to read all the images from 
the input stream, whereas without it, \fBpamfile\fP 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 image.
.sp
This option has no effect if you also specify \fB-count\fP.
.sp
Note that before July 2000, a file could not contain more than one
image and many programs ignore all but the first.
.sp
This option was new in Netpbm 9.5 (July 2000).

.TP
\fB-comments\fP
This option causes \fBpamfile\fP to include for each PAM image
a report of the comments from the header of the image.
.sp
For a PBM, PGM, or PPM image, \fBpamfile\fP reports there are no
comments, even if there are.
.sp
This option was new in Netpbm 10.35 (August 2006).

.TP
\fB-count\fP
This option causes \fBpamfile\fP to display only a count of how many
images are in each input file.
.sp
As with \fB-allimages\fP, this causes \fBpamfile\fP to read all the
images.
.sp
You may specify at most one of \fB-count\fP, \fB-machine\fP,
and \fB-size\fP.
.sp
This option was new with Netpbm 10.31 (December 2005).

.TP
\fB-machine\fP
This makes the output more convenient for a machine to use, while
  less convenient for a human.  \fBpamfile\fP reports the same information
  as with no options.
.sp
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:

    
.IP \(bu
Format: 'PAM', 'PBM', 'PGM', or
        'PPM',
.IP \(bu
Subformat: 'PLAIN' or 'RAW'
.IP \(bu
Width: in pixels, in decimal
.IP \(bu
Height: in pixels, in decimal
.IP \(bu
Depth: in decimal
.IP \(bu
Maxval: in decimal (1 if image is PBM)
.IP \(bu
Tuple type (emulated if the image is not PAM)
    
.sp
You may specify at most one of \fB-count\fP, \fB-machine\fP,
and \fB-size\fP.
.sp
This option was new in Netpbm 10.86 (March 2019).

.TP
\fB-size\fP
This makes the output contain only the height and width of the image,
in a form convenient for machine processing.
.sp
There is one line of output per image, consisting of two blank-delimited
tokens:


.IP \(bu
Width: in pixels, in decimal
.IP \(bu
Height: in pixels, in decimal
  
.sp
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 \fB-machine\fP instead.
.sp
You may specify at most one of \fB-count\fP, \fB-machine\fP, and
\fB-size\fP.
.sp
This option was new in Netpbm 10.86 (March 2019).



.UN seealso
.SH SEE ALSO
.BR "pam" (1)\c
\&,
.BR "ppmhist" (1)\c
\&,
\fBfile\fP

.UN author
.SH AUTHOR

Copyright (C) 1991 by Jef Poskanzer.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pamfile.html
.PP