There are a wide variety of output formats, selectable in detail by the `lower case' options described in the OPTIONS section below. These options select which items to print, and within narrow confines, how and where to print them. A large number of combinations of options exist, and some of those combinations may not be sensible. In order to avoid the need for constant creativity or invention, three `prefabricated' output formats are provided, selected by the upper case option letters.
The structural (-S) output format provides a description of the image file which mimics as closely as possible the layout and structure of the data in the image file, including file offsets of headers, section and segment markers, fully described TIFF IFD entries, and the location of actual image and/or thumbnail data. The contents of each section are indented relative to the beginning of the section, and 'offset' values for TIFF IFDs are reported at the offsets where they are found (usually following the entry list.
The report format (-R) shows the `logical' structure of the image file, but eliminates addresses, offsets, IFD value types and counts, etc., and prints `offset' IFD values inline, while otherwise preserving the primary structure of the data.
The list format (-L) writes only `tag' values from TIFF, Exif, and MakerNote IFDs. This option may hide the presence of JPEG `APP' sections or MakerNote sections which are not in IFD format. It is likely to be silent about JFIF files (for example), but will be useful for extracting information for photo galleries from Exif or TIFF/EP files.
The structural format is default. This format provides maximum information about the contents of an image file, and may reveal information (sometimes important) which other formats (or image info programs) may hide.
An environment variable may be set to customize the default behavior (see below).
MakerNotes which are not in a recognizable IFD format will be reported (start and end offsets) in structural (-S) and report (-R) formats , and may be hex/ascii dumped in whole or in part by the -M option (see below).
In list (-L) format, the starting file offset of the MakerNote will be reported, and two `pseudo' tags which report the size (MakerNoteCount) and scheme (MakerNoteScheme) will appear.
The program may be compiled without support for color sequences.
Within sections, JPEG segment markers, IFD entries, and the contents of known APP sections are printed.
Each line of output is preceded by a file offset given in hex and decimal. File offsets are preceded by the character `@', except that section end markers are preceded by `-' and the character `^' may be used to mark sections which are printed lqout of order'.
JPEG markers are written with the marker name, and the decoded values of any information associated with the marker.
TIFF information is written in a manner which reflects the structure of the IFD, with all values interpreted according to the applicable specification where possible. All IFD fields are reported. The following fields will appear (in the order given, following the file offset):
If the value for the entry did not fit in the four bytes of the entry, then the value found is an offset to the actual location of the data; that offset is printed preceded by an '@' symbol. The actual value will be printed later, at the file offset where it was found (except in some non-conforming MakerNote IFDs).
The list of entries will be followed by a line giving the offset to the next IFD (often 0) which is always found at the end of a TIFF IFD entry list.
If there were offset entries found in the list above, the TIFF (and Exif) specification suggests that they will be located next in the file (although this is not always the case in real camera images). A line reporting the beginning of these offset values will be printed next, followed by one line for each offset entry, with the tag name repeated, followed by the actual value, followed by its interpretation (if any).
Multiple values are printed on a single line, but large lists will be elided, with just the first two or three values shown, followed by an ellipsis, followed by the last value, the number of values, and the offset of the last value in the list. The full value list may be printed using the -eA option.
In this format, ascii strings in the entry are printed for the entire length given in the IFD entry, including nulls and non-ascii values (if present), which are printed in `backslashed' octal notation. The -ea option may be used to force ascii values to be printed only up to the first null.
The resulting output displays the contents of the IFD much as it appears in the file (see the TIFF or EXIF specifications for descriptions of the IFD format).
Entries are indented slightly from the start identifier for the IFD, and subsegments (e.g. an Exif IFD, SubIFD, or MakerNote) will be further indented in order to indicate the structure of the file.
Finally, the start and end of actual image data for the primary image (and possibly thumbnail image) is reported at the end. For JPEG interchange format files, this usually includes display of the JPEG segment markers within the image.
Note that values preceded by `@' are always offsets (usually from the beginning of the file) to the actual value. Recorded IFD offsets are usually recorded in the file as offsets relative to the beginning of the TIFF header (which is offset from the beginning of the file in JPEG APP1 files) but are adjusted by exifprobe to show offset from the beginning of the file. If it is important to see the recorded value, the -er option may be used to print the recorded value in parentheses, following the adjusted file offset.
As an example, the
command:
exifprobe -Z -et somefile.tifmay be used to list just the TIFF and Exif tags, without values (or anything else)
exifprobe -eNnT somefile.tifwill print in structural format, suppressing output of hex and decimal tag numbers, and tag type and count.
export EXIFPROBE_OPTIONS='-Z -L'
will make list format the default output format.
Options are evaluated from left to right, so -Z should be given first, while -D (decimal only) or -X (hex only) should be given last.
- s - sections (IFDs, APPn)
- g - segments (JPEG segments)
- a - JPEG APP0...APPn entries
- m - print MakerNote scheme description
- t - tagname
- n - tag number in decimal
- N - tag number in hex
- T - entry type and count
- v - value in decimal
- V - value in hex
- o - file offset to value in decimal
- O - file offset to value in hex
- r - relative (unadjusted) offset in decimal
- R - also print `raw' values where normal values are computed (e.g. rational values, or some MakerNote values where APEX values must be computed from a raw value).
- A - print ALL elements of mutiple-value tags
- a - ascii "ignore length" (stop at first null)
program version and copyright
Floating point values read from the file are expected to be in IEEE format (or at least, native format); i.e. no conversions are attempted.
ANSI color sequence support should use termcap/terminfo facilities; it does not.
dhh@virtual-cafe.com