Debian Codegraph @

exifprobe.1.html

raw
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 <B>EXIFPROBE(1)</B> <B>EXIFPROBE(1)</B>
7
8
9
10 <B>NAME</B>
11 exifprobe - probe and report structure and metadata content of camera
12 image files
13
14 <B>SYNOPSIS</B>
15 <B>exifprobe</B> [<I>options</I>] <I>filename(s)</I>
16
17 <B>DESCRIPTION</B>
18 <B>Exifprobe</B> reads image files produced by digital cameras (including sev-
19 eral so-called "raw" file formats) and reports the structure of the
20 files and the auxilliary data and metadata contained within them. In
21 addition to TIFF, JPEG, and EXIF, the program understands several for-
22 mats which may contain "raw" camera data, including MRW, CIFF/CRW,
23 JP2/JPEG2000, RAF, and X3F, as well as most most TIFF-derived "raw"
24 formats, including DNG, ORF, CR2, NEF, K25/KDC/DCR, and PEF. Other TIFF
25 or JPEG-derived formats (which begin with a TIFF header or JPEG marker)
26 should also be readable. The program attempts to display ALL informa-
27 tion in the image file, in a manner which mimics the structure of the
28 file as closely as possible.
29
30 Where possible, output is not limited to "known" data items. I.e. for
31 tagged file formats, unknown tags will be identified by tag number and
32 type, and values shown without interpretation. Proprietary, untagged or
33 fixed format files do not permit this, but unknown or undefined data
34 can usually be dumped in a hex/ascii format for examination, so long as
35 the file structure is understood. The program will report the contents
36 of any properly structured TIFF IFD or CIFF directory encountered, even
37 when entry tags are not recognized. Recognized TIFF, TIFF/EP, DNG, and
38 CIFF tags are expanded, including EXIF2.2 sections and camera Maker-
39 Notes which are found to be in TIFF IFD format. TIFF and/or JPEG sec-
40 tions found in MRW, RAF or JP2 files will be reported, along with the
41 "native" sections of those formats. JP2 boxes will be reported whether
42 known or unknown, and expanded if known. Unknown boxes cannot be
43 expanded, since JP2 is not tagged below the box (or sub-box) level.
44
45 An effort is made to identify all sub-images (in any image format) con-
46 tained in multi-image files; the location, size, and format of such
47 images is reported, and a hex/ascii dump of the image data may be
48 requested. Image data is not processed, but the program will recognize
49 and report all standard JPEG and JPEG2000 markers (including JPEG APPn
50 markers) and will expand APP0 (JFIF/JFXX) and APP1 (EXIF) sections.
51
52 Since the program does not attempt to display images or modify the con-
53 tents of files, it can often recover from and report failures or warn
54 about structural oddities which would confuse a display or image edit
55 program.
56
57 There are a wide variety of output formats, selectable in detail by the
58 "lower case" options described in the <B>OPTIONS</B> section below. These
59 options select which items to print, and within narrow confines, how
60 and where to print them. A large number of combinations of options
61 exist, and some of those combinations may not be sensible. In order to
62 avoid the need for constant creativity or invention, three "prefabri-
63 cated" output formats are provided, selected by the <I>upper</I> <I>case</I> option
64 letters.
65
66 The <I>structural</I> (<B>-S</B>) output format (default) provides a description of
67 the image file which mimics as closely as possible the layout and
68 structure of the data in the image file, including file offsets of
69 headers, section and segment markers, fully described TIFF IFDs, CIFF
70 directories, or JP2 boxes, and the location of actual image and/or
71 thumbnail data. The contents of each section are indented relative to
72 the beginning of the section, and "offset" values for TIFF IFDs and
73 CIFF directories are reported at the offsets where they are found (usu-
74 ally following the entry list for TIFF, or in the HEAP for CIFF). The
75 peculiar "reverse" structures of CIFF and X3F formats are handled sen-
76 sibly.
77
78 The <I>report</I> format (<B>-R</B>) shows the "logical" structure of the image file,
79 but eliminates addresses, offsets, IFD value types and counts, etc.,
80 and prints "offset" directory values inline, while otherwise preserving
81 the primary structure of the data.
82
83 The <I>list</I> format (<B>-L</B>) omits all structural data. It writes only "tag"
84 values from TIFF, Exif, and MakerNote IFDs, CIFF or other format direc-
85 tories or JP2 boxes, including section and image offsets and sizes.
86 Identifiable values from non-tagged formats are written in a similar
87 manner. This format may be useful for extracting information for photo
88 galleries.
89
90 The <I>structural</I> format is default. This format provides maximum infor-
91 mation about the contents of an image file, and may reveal information
92 (sometimes important) which other formats (or image info programs) may
93 hide.
94
95 In all formats, the filename, file <I>type</I>, file size, an <I>image</I> <I>summary</I>,
96 and a summary <I>file</I> <I>format</I> will be displayed (even when all other output
97 is disabled by option). The image summary includes a summary report,
98 for each subimage found, giving the image type, compression type (if
99 any), pixel size, data length, file offset where found, and section of
100 the file which includes or references the image. In some cases, short
101 remarks may be included for images mentioned but not found, etc. The
102 summary concludes with the number of images found, and number of images
103 not found (if any). The summary is followed by a listing of format sec-
104 tions found (TIFF/JPEG/EXIF, etc.) and a type identifier for TIFF-
105 derived types (e.g. <I>CR2</I>) where possible.
106
107 An environment variable may be set to a list of options to customize
108 the default output behavior (see below).
109
110
111 <B>MakerNotes</B>
112 Camera-generated images which contain EXIF sections may also contain
113 sections introduced by a <I>MakerNote</I> tag, which may contain information
114 about camera or firmware settings used to produce the image. The
115 structure and contents of MakerNote sections is not mandated by the
116 Exif specification, but many camera MakerNotes are written in TIFF IFD
117 format, possibly offset following an ID string or new TIFF header (or
118 both), and sometimes with inventive handling of "offsets". <B>Exifprobe</B>
119 currently understands and automatically detects such schemes and prints
120 the contents of the IFD (and the ID string, if present). This detec-
121 tion is not dependent upon make or model of camera. <I>Make</I> and <I>Model</I>
122 information will usually be available from the first TIFF IFD in the
123 file; this information may be used to <I>interpret</I> the MakerNote informa-
124 tion for "known" cameras; otherwise, tag numbers, sizes, types, and raw
125 values from the IFD will be shown (if permitted by option settings).
126
127 Some camera makes are known to use more than one version of MakerNote,
128 depending upon model. If an unknown model from that maker is encoun-
129 tered, the note will be briefly examined and a noteversion assigned
130 automatically if possible. If that fails, the note will be displayed
131 without interpretation.
132
133 MakerNotes which are not in a recognizable IFD format will be reported
134 (start and end offsets) in structural (<B>-S</B>) and report (<I>-R</I>) formats ,
135 and the beginning of the note section hex/ascii dumped. The remainder
136 of the note may be dumped, in whole or in part, by the <I>-M</I> option (see
137 below).
138
139 In list (<I>-L</I>) format, the starting file offset and length supplied by
140 the MakerNote tag will be reported, and three "pseudo" tags which
141 report the offset (<I>MakerNote.Offset</I>), size (<I>MakerNote.Length</I>) and
142 scheme (<I>MakerNote.Scheme</I>) will appear.
143
144
145 <B>JPEG</B> <B>APPn</B>
146 In JPEG interchange format files, APP0 (JFIF,JFXX) and APP1 (Exif) seg-
147 ments will be fully decoded, and the "printable" portions of APP12 sec-
148 tions will be displayed. APP3 (Meta) sections will be expanded and the
149 contained TIFF IFD will be displayed, although little interpretation is
150 done. Other APP markers will be reported, and the sections may be
151 hex/ascii dumped in whole or in part using the <I>-A</I> option. APP1 sections
152 not marked as <I>Exif</I> will be treated as unknown.
153
154
155 <B>ANSI</B> <B>Color</B>
156 The program (by default) emits ANSI color escape sequences to highlight
157 Exif, MakerNote , and Interoperability sub-sections. Errors and warn-
158 ings are highlighted in red. These sequences are effective, of course,
159 only for terminals or terminal emulators (e.g. <B>xterm</B>) which respond to
160 ANSI color escape sequences. If a pager is used to display the output
161 when these sequences are present, a "raw" option to the pager may be
162 required (e.g. <B>less</B> -R). The use of these sequences may be toggled by
163 the <B>-c</B> option. LIST mode turns color sequences off.
164
165 The program may be compiled without support for color sequences.
166
167
168 <B>OUTPUT</B> <B>FORMATS</B>
169 In all formats, and regardless of option setting, the first three lines
170 of output for each file processed are the filename, image <I>type</I> (TIFF,
171 CIFF, JP2, etc.), and the file size. If the type (taken from the file
172 header) specifies a data byte order, the byte order will be indicated
173 with the type as `II' (Intel byte order) or `MM' (Motorola byte order).
174 The image summary and summary format will always be printed at the end.
175
176
177 <B>Structural</B> <B>Format</B>
178 Structural format output begins with a display of the file header. The
179 header is followed by lines of the form
180 <I>&lt;IFD0&gt;</I>
181 ...
182 &lt;/IFD0&gt;
183 <I>&lt;APP0&gt;</I>
184 ...
185 &lt;/APP0&gt;
186 <I>&lt;DIRECTORY&gt;</I>
187 ...
188 &lt;/DIRECTORY&gt;
189 etc. to indicate the beginning and end of each "section" of the file.
190 Actual section names will, of course, depend upon the file format
191 and/or the tags encountered. Only the TIFF IFD format is described
192 here; other formats are similar, except that JP2 box names are printed
193 inside square (rather than angle) brackets, and MRW section names
194 inside curly braces.
195
196 Within sections, directory entries, subdirectories, the contents of
197 known APP sections, JPEG segment markers, etc. are printed. Non-jpeg
198 image data sections will be shown with a few lines of hex/ascii dump of
199 the beginning of the data.
200
201 Each line of output is preceded by a file offset given in hex and deci-
202 mal. File offsets are preceded by the character `@', except that
203 section end markers are preceded by `-' and the character `&gt;' may be
204 used to mark sections which are located outside the IFD in which they
205 are declared. If that section includes a subsection which is similarly
206 afflicted, the '&gt;' is replaced by '+' in the subsection. In JP2 files,
207 the '@' is replaced by '=', for no particular reason.
208
209 JPEG and JPEG2000 segment markers are written with the marker name, and
210 the decoded values of any information associated with the marker.
211
212 TIFF information is written in a manner which reflects the structure of
213 the IFD, with all values interpreted according to the applicable speci-
214 fication where possible. All IFD fields are reported. The following
215 fields will appear on each line (in the order given, following the file
216 offset):
217
218 <B>o</B> Tag number in hex and decimal representations, enclosed in
219 brackets.
220
221 <B>o</B> Tag name (where known); names for unknown tags are created as a
222 hex representation of the tag number prefixed by the string
223 'TAG_'.
224
225 <B>o</B> The TIFF type number, name, and byte count for the associated
226 value, enclosed in square brackets.
227
228 <B>o</B> The "value/offset" for the entry. If the value fits in the four
229 bytes of the entry, the value is printed directly.
230
231 If the value for the entry did not fit in the four bytes of the
232 entry, then the value found is an offset to the actual location
233 of the data; that offset is printed preceded by an '@' symbol.
234 The actual value will be printed later, at the file offset where
235 it was found (except in some non-conforming MakerNote IFDs). If
236 the value requires <I>interpretation</I> (e.g. TIFF <I>Orientation</I>) it is
237 followed by an '=' sign and the interpretation, enclosed in dou-
238 ble quotes (e.g. <I>"0,0</I> <I>top</I> <I>left"</I>).
239
240 The list of entries will be followed by a line giving the offset to the
241 next IFD (often 0) which is always found at the end of a TIFF IFD entry
242 list.
243
244 If there were offset entries found in the list above, the TIFF (and
245 Exif) specification requires that they will be located next in the
246 file, immediately following the dirctory entries. This stricture is
247 frequently ignored in MakerNotes and TIFF-derived formats. A line
248 reporting the beginning of these offset values will be printed immedi-
249 ately after the next IFD offset, followed by one line for each offset
250 entry, with the tag name repeated, followed by the actual value, fol-
251 lowed by its interpretation (if any).
252
253 Multiple values in entries are printed on a single line, but large
254 lists will be elided, with just the first two or three values shown,
255 followed by an ellipsis, followed by the last value, the number of val-
256 ues, and the offset of the last value in the list. The full value list
257 may be printed using the <B>-eA</B> option.
258
259
260 In structural format, ascii strings in the entry are printed for the
261 entire length given in the IFD entry, including nulls and non-ascii
262 values (if present), which are printed in `backslashed' octal notation.
263 The <B>-ea</B> option may be used to force ascii values to be printed only up
264 to the first null. This option is often necessary for CIFF format
265 files, and is enabled by default in "list" mode.
266
267 Entries are indented slightly from the start identifier for the IFD,
268 and subsegments (e.g. an Exif IFD, SubIFD, or MakerNote) will be
269 further indented in order to indicate the structure of the file.
270
271 The resulting output displays the contents of the IFD much as it
272 appears in the file (see the TIFF or EXIF specifications for descrip-
273 tions of the IFD format).
274
275 Finally, the start and end of actual image data for the primary image
276 (and possibly thumbnail or reduced-resolution image) is reported at the
277 end. For JPEG images, this usually includes display of the JPEG seg-
278 ment markers within the image. Binary format image data will be shown
279 with a brief hex/ascii dump of the beginning of the data, between start
280 and end markers.
281
282 <I>Note</I> that <I>values</I> preceded by `@' are always offsets <I>from</I> <I>the</I> <I>beginning</I>
283 <I>of</I> <I>the</I> <I>file</I> to the actual value. IFD offsets are usually recorded in
284 the file as offsets relative to the beginning of the TIFF header (which
285 is offset from the beginning of the file in JPEG APP1 files) but are
286 adjusted by <B>exifprobe</B> to show offset from the beginning of the file.
287 If it is important to see the recorded value, the <B>-er</B> option may be
288 used to print the recorded value in parentheses, following the adjusted
289 file offset.
290
291
292 <B>Report</B> <B>Format</B>
293 The <I>report</I> format (<I>-R</I>) displays all sections and segments of the image
294 file, including start and end of sections, but eliminates much of the
295 "cruft" of the structural format by eliminating address/offset informa-
296 tion and much of the `internal' information from the TIFF IFD (tag num-
297 ber, type and count). <I>Offset</I> values are printed inline with the tag
298 name. The output is indented to show the <I>logical</I> structure of the
299 image file, but is much less difficult to view than the structural for-
300 mat.
301
302
303 <B>List</B> <B>format</B>
304 The <I>list</I> format (<I>-L</I>) suppresses structural information, writing only
305 <I>content</I> in the format <I>tagname</I> <I>=</I> <I>value</I> or <I>tagname</I> <I>=</I> <I>value</I> <I>=</I> <I>"what</I> <I>value</I>
306 <I>means"</I>. For non-tagged file formats, the tagname will be replaced by a
307 fixed identifier for the item. In LIST format, "long" tagnames are
308 used, which include the names of all parent sections of the section in
309 which the data is found. Long tagnames can be toggled off, although
310 this is unwise if the file contains multiple image sections.
311
312 The "value" of tags or items which represent an offset to a subsection
313 or image are printed in <I>list</I> format as "<I>@offset:length</I>".
314
315 The List format is used by the auxilliary script <B>exifgrep</B>, which per-
316 mits selective extraction of information e.g. for photo galleries, and
317 output in (almost) "shell variable" format.
318
319
320 <B>Custom</B> <B>Formats</B>
321 The <B>-Z</B> option "zeroes" all option flags (except the <I>longnames</I> modi-
322 fier), after which the lower-case options may be used to set desired
323 options. The lower-case options are `toggles', which may also be used
324 to turn <I>off</I> items in the pre-defined formats.
325
326 As an example, the command:
327
328 <I>exifprobe</I> <I>-Z</I> <I>-et</I> <I>somefile.tif</I>
329
330 may be used to list just the TIFF and Exif tags, without values (or
331 anything else) in "long name" format.
332
333 <I>exifprobe</I> <I>-eNnT</I> <I>somefile.tif</I>
334
335 will print in structural format, suppressing output of hex and decimal
336 tag numbers, and tag type and count.
337
338 The "zero-level" output still reports the file data and image summary
339 as described above.
340
341
342 <B>OPTIONS</B>
343 The environment variable <B>EXIFPROBE_OPTIONS</B> may be set to any valid
344 option string, which will be evaluated before command line options.
345 E.g.
346
347 export EXIFPROBE_OPTIONS='-L -c'
348
349 will make list format the default output format, and re-enable the
350 color sequences turned off by <I>-L</I>.
351
352 Options are evaluated from left to right, so <B>-Z</B> should be given first,
353 while <B>-D</B> (decimal only) or <B>-X</B> (hex only) should be given last.
354
355
356 -S Structure mode: (default) almost everything; offset values
357 not inline
358
359 -R Report mode: like structural, but only tagnames and decimal
360 values, indented, inline
361
362 -L List mode: print only tags and values (including interpreted
363 values); no section info; no color
364
365 -Z turn off (zero) all optional output. Prints only filename,
366 filetype, filesize, image summary, and file format.
367
368 -c toggle use of ANSI color control sequences to emphasize EXIF
369 sections. (default 'on' except list mode, unless compiled
370 with no color support)
371
372 -a toggle printing of addresses (file offsets) in hex and deci-
373 mal
374
375 -I three-way toggle indent (after address -&gt; before -&gt; none)
376
377 -o toggle "inline" print of offset IFD values
378
379 -p[items] toggle print identifiers for:
380
381 s - sections (IFDs, APPn)
382
383 g - segments (JPEG segments)
384
385 a - JPEG APP0...APPn entries
386
387 l - long names (dot-separated list of parent sections pre-
388 ceding item name)
389
390 e - entries. Includes tag names, numbers, types, values.
391
392 m - print MakerNote scheme description
393
394 M - watch debug of MakerNote scheme detection
395
396
397 -e[items] toggle print IFD entry items:
398
399 t - tagname
400
401 n - tag number in decimal
402
403 N - tag number in hex
404
405 T - entry type and count
406
407 v - value in decimal
408
409 V - value in hex
410
411 o - file offset to value in decimal
412
413 O - file offset to value in hex
414
415 r - relative (unadjusted) offset in decimal
416
417 R - also print "raw" values where normal values are com-
418 puted (e.g. rational values, or some MakerNote values
419 where APEX values must be computed from a raw value).
420
421 A - print ALL elements of multiple-value tags
422
423 a - ascii "ignore length" (stop at first null)
424
425 -D limit all enabled numerical values to decimal only
426 (addresses, tag numbers, offsets, values)
427
428 -X limit all enabled numerical values to hex only (addresses,
429 tag numbers, offsets, values)
430
431 -U[len|a] dump <I>len</I> (or all) bytes of UNDEFINED data found in TIFF IFDS
432 in hex/ascii form (but only if the structure of the data is
433 not known)
434
435 -M[len|a] dump <I>len</I> (or all) bytes of unrecognized MakerNotes in
436 hex/ascii form (but only if the structure of the data is not
437 known)
438
439 -A[len|a] dump <I>len</I> (or all) bytes of unrecognized JPEG APP segments in
440 hex/ascii form (but only if the structure of the data is not
441 known)
442
443 -B[len|a] dump <I>len</I> (or all) bytes of binary image data or failed JPEG
444 image data
445
446 -C[make]+[model]
447 print a list of camera makes/models matching <I>make</I> or <I>model</I> as
448 substrings. <B>`+'</B> by itself prints everything
449
450 -O start_offset
451 start processing at file offset <I>start</I><B>_</B><I>offset</I>
452
453 -n print filename at beginning of each line of output (useful
454 when grepping multiple files in LIST mode)
455
456 -N noteversion
457 force use of note version <I>noteversion</I> when interpreting Mak-
458 erNotes. Useful only if you know what you're doing.
459
460 -m make Force the makernote code to interpret the note according to
461 the <I>make</I> given, rather than that contained in the file.
462
463 -l model force the makernote code to interpret the note according to
464 the <I>model</I> given, rather than that contained in the file.
465
466 -t This option has effect only if set in <B>EXIFPROBE_OPTIONS</B>. If
467 set when command line options are processed, color will be
468 be off <I>by</I> <I>default</I> if the output is not to a tty. Any command
469 line option which toggles or sets color (e.g. "-R") will turn
470 color back on.
471
472 -u Print "raw" Unicode data. Normally 16 bit data is printed as
473 though the high byte is zero (which is often the case).
474 Writing the nulls would annoy most ascii terminal devices, so
475 the default is more hospitable. The <I>-u</I> option forces print-
476 ing of the full value.
477
478 -h print a help message
479
480 -V print program version and copyright
481
482
483 <B>SEE</B> <B>ALSO</B>
484 <B>exifgrep(1)</B>
485 The TIFF6 specification:
486 https://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf
487 The Exif 2.2 specification:
488 http://tsc.jeita.or.jp/avs/data/cp3451.pdf
489 The JFIF specification:
490 http://www.w3.org/Graphics/JPEG/jfif3.pdf
491 The TIFF/EP specification:
492 http://www.map.tu.chiba-u.ac.jp/IEC/100/TA2/recdoc/N4378.pdf
493 The CIFF specification
494 http://xyrion.org/ciff/CIFFspecV1R04.pdf
495 The X3F public specification
496 http://www.sd9.org.uk/X3F_Format.pdf
497 The JPEG2000 public draft (outdated)
498 http://www.jpeg.org/public/fcd15444-1.pdf
499
500 <B>DIAGNOSTICS</B>
501 Most diagnostics are printed "inline" to stdout, in red if color is
502 enabled, and the program attempts to proceed.
503
504 <B>BUGS</B>
505 Interpretation of MakerNote data for specific cameras is incomplete and
506 probably always will be. The X3F specification is incomplete, and the
507 final JPEG2000/JP2 specification is not freely available; support for
508 these formats is therefore not complete, and may not be entirely accu-
509 rate.
510
511 The RAF file format support is preliminary (there is no published spec-
512 ification).
513
514 Floating point values read from the file are expected to be in IEEE
515 format (or at least, native format); i.e. no conversions are attempted.
516
517 ANSI color sequence support should use termcap/terminfo facilities; it
518 does not.
519
520
521 <B>AUTHOR</B>
522 Duane H. Hesser
523 [email protected]
524
525
526
527
528 LOCAL <B>EXIFPROBE(1)</B>
529 </PRE>
530 <HR>
531 <ADDRESS>
532 Man(1) output converted with
533 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
534 </ADDRESS>
535 </BODY>
536 </HTML>