General: Exif Data, Using ExifTool on the Mac, Links

What is Exif (Exchangeable Image File Format)? | Using ExifTool on the Apple Macintosh | Hyperfocal Distance and the Secret of the "Composite" Fields... | Links to ExifTool and More

On this page, I provide more general information about Exif data and about extracting these with ExifTool the Apple Macintosh. Then I will briefly come to the (for me) mysterious "composite" data... Finally, I list links to ExifTool and to the Exif standard.

Manufacturer-specific data for the Ricoh GXR and the Leica X Vario are discussed on separate pages.

 

What is Exif (Exchangeable Image File Format)?

The following text is a adaptation of a Wikipedia article.

Exchangeable image file format (Exif, often incorrectly EXIF) is a standard that specifies the formats for images, sound, and ancillary tags used by digital cameras (including smartphones), scanners and other systems handling image, and sound files recorded by digital cameras. The Japan Electronic Industries Development Association (JEIDA) produced the initial definition of the Exif standard. The latest, version 2.3 dated April 2010, was jointly formulated by JEITA and CIPA. Although the specification is not currently maintained by any industry or standards organization, almost all camera manufacturers use it.

This standard consists of the Exif image file specification and the Exif audio file specification. It adds metatags to the following image file formats: JPEG for compressed image files, TIFF for uncompressed image files, but is not supported in JPEG 2000, PNG, or GIF. Since the standard only allows TIFF or JPEG files – there is no provision for a "raw" file type which would be a direct data dump from the sensor device – camera manufacturers invented many proprietary, incompatible "raw" file formats. To solve this problem, Adobe developed the DNG format (a TIFF-based raw file format), in hopes that manufacturers would standardize on a single, raw file format.

The metadata tags defined in the Exif standard cover a broad spectrum:

  • Date and time information. Digital cameras will record the current date and time and save this in the metadata.
  • Camera settings. This includes static information such as the camera model and make, and information that varies with each image such as orientation (rotation), aperture, shutter speed, focal length, metering mode, and ISO speed information.
  • A thumbnail for previewing the picture on the camera's LCD screen, in file managers, or in photo manipulation software.
  • Descriptions
  • Copyright information
  • Geo-location (if available).

For the purpose of this Website, the camera settings are most important because they allow to inspect the settings "after the fact", that is, after a photo was taken. But there is also a caveat.The Exif standard defines a MakerNote tag, which allows camera manufacturers to place any custom format metadata in the file. This is used increasingly by camera manufacturers to store myriad camera settings not listed in the Exif standard, such as shooting modes, post-processing settings, serial number, focusing modes, etc. As this tag format is proprietary and manufacturer-specific, it can be prohibitively difficult to retrieve this information from an image (or properly preserve it when rewriting an image). Some manufacturers also encrypt portions of the information.

Unfortunately, the proprietary formats used by many manufacturers break if the MakerNote tag is moved, for example, by inserting or editing a tag which precedes it. The reason to edit to the Exif data could be as simple as to add copyright information, an Exif comment, etc. In some cases, camera vendors also store important information only in proprietary makernote fields, instead of using available Exif standard tags. An example for this is Nikon's ISO settings tag.

Although the MakerNote tag contains image information normally in a proprietary binary format, some of these manufacturer-specific formats have been decoded, for example by the author of ExifTool. I have also encoded an important tag that records the distance that the Leica X Vario set. For details on tags specific to the Leica X Vario see page Manufacturer-Specific Exif Data.

 

Using ExifTool on the Apple Macintosh

If you have certain issues with your photos, it can be useful to find information about the camera settings in the Exif data. To inspect Exif data, you need a tool that displays them. Many photo applications, for example, do so, but most applications and tools display only a subset of the Exif data. Moreover, camera manufacturers hide manufacturer-specific data in Exif fields that are not documented publicly. Therefore, it is difficult to decipher this data, if if may be of primary importance for judging what happened to certain photos.

The probably largest set of Exif data is displayed by the ExifTool application provided by Phil Harvey. This is a command-line tool that can be installed on Unix, Windows, and Apple Macintosh computers. For Windows, there is a GUI shell (ExifToolGUI) that makes working with ExifTool much easier (see the references below). Thus, my first step in getting at the largest possible set of Exif data was to download and install ExifTool on my Apple Macintosh. In the following, I make some remarks on using ExifTool on the Mac via the Terminal application - which is not very convenient... Further down, I show how you can simplify your life with ExifTool on the Mac.

Using ExifTool with the Terminal Application

The ExifTool application is installed in directory /usr/bin. I typically move the photos to directory /usr and have the output displayed in the Terminal window. This leads to the following command line:

Usually, I copy this line from my Website, paste it into the Terminal window, and edit the filename...

Sidenote - How to move photos to directory /usr: Since this is a Unix directory that is usually hidden from the user's view, you may have difficulties in finding it. A simple way is to access it via the Finder's Go menu and select menu item Go to folder:

After you click the Go button, a window showing the /usr directory opens. Now you can copy or move images there. Note that you have to provide an administrator password to be able to do this.

BTW: GraphicConverter on the Mac provides information using ExifTool but displays only a subset the Leica-specific fields.

Note: For some information, you may have to set the verbose mode to 3 at least (-v3) to find the respective tags in the Exiftool output. Here is a sample command line initiating this mode:

Adding A Little More Comfort to ExifTool on the Apple Macintosh

Admittedly, despite all these "trick," I still found using Exiftool on the Apple Macintosh cumbersome, particularly if you need to inspect quite a few images. Therefore, I looked for a way to simplify my workflow and found one in Rob Lewis' three AppleScript droplets - note that there is no ExifTool GUI available as it is for Windows. The links to the droplets are provided on the Exiftool Website.

The three droplets are very similar and differ only in that they display the data in either a non-scrollable dialog window, an editable Textedit window, or a scrollable list window. The first one is unusable in my case, because it it not scrollable and the data that I want to see are not accessible. The Textedit version is the most usable droplet, because it allows you to set the font to monospaced (for example to Courier, Courier New, or Monaco) so that the window content looks better, and it also allows you the edit (particularly to delete unwanted data) and save the data.

The droplets allow you to select several image files at once and drag them onto the droplet icon or an alias. The Exif data for the images will appear in a window one below the other...

However, there is one important issue with the droplets as they are delivered: They do not display the manufacturer-specific data. Luckily, the Readme file states that you can edit the droplets in a script editor (I use Apple's script editor AppleSript-Editor.app, which resides in the utilities folder within the applications folder) to change the parameters that are handed over to Exiftool. So I changed the parameters from the original "-S" (very short output) to "-a -u -g1" and received the results that I wanted. Here is just the "relevant" portion of the data:

Figure: Portion of the Exif data that show the Ricoh-specific fields (List Exif Metadata (edit).app, parameters modified, Courier New)

Figure: Portion of the Exif data that show the Leica-specific fields (List Exif Metadata (edit).app, parameters modified, Courier New)

After having edited the droplet parameters, the handling is quite simple (before that, however, you need to download and install Exiftool...)

No need any more to use the Apple Terminal application and to move images to the /usr directory (and provide your admin password when you move them). And as a bonus, you can get the data from several files in one window. What a relief!

My final wish would be to be able to restrict the output to just the data that I need. Perhaps, this is also possible, but, at the moment, I have no idea how to accomplish this. Of course, you can delete unwanted data if you used the "edit" droplet...

pyExifToolGui

Recently, I discovered another alternative to using the "pure" ExifTool application: pyExifToolGui by Harry van der Wolf (Website). In contrast to ExifTool GUI for Windows it is available for several platforms, including Mac OS X.

Since I need to display manufacturer-specific Exif fields, I use the tool more or less exclusively in the "Your Commands" mode. In the browser, I go to this page and copy the command line "-a -u -g1" into the "Parameters:" field. Then I load the images of which I want to inspect the Exif data, select the ones that I currently focus on, and finally hit the "Go" button. The figure below shows an example:

Figure: pyExifToolGui screen (with Leica data), "Your Command" tab, with parameters included

 

Hyperfocal Distance and the Secret of the "Composite" Tags...

ExifTool lists "Composite" tags at the end of the lists of Exif data that it supplies, among others, the hyperfocal distance (HFD). The same does the long-time Mac image tool GraphicConverter that I use for ages. I therefore assumed that such a thing as a "composite Exif tag" does exist and that some cameras write the hyperfocal distance into the Exif data. I was, however, wrong, as I found out on the ExifTool Website. Author Phil Harvey writes:

He then lists all of the composite tags that he supplies, including from which other tags these are derived. For calculating the hyperfocal distance, he uses the FocalLength, Aperture, and CircleOfConfusion tags in the Exif data. This may explain, why I detected differences between the value in the composite HFD tag and my own calculations based on the DOFMaster formulae. I assume, that Harvey does not use the exact aperture value, which is based on powers of two, but directly the one given in the Exif data. Since the deviations can be in either direction, the calculated values may be some times too short and sometimes too wide (they should not be taken too strictly anyway...). I may check my assumption some day in the future...

 

Links to ExifTool and More

The probably largest set of Exif data is displayed by the ExifTool application provided by Phil Harvey. This is a command-line tool that can be installed on Unix, Windows, and Apple Macintosh computers. For Windows, there is also a GUI shell available. For copyright reasons, I do not duplicate the information that Phil Harvey provides on his site and provide just a number of links to specific content and topics.

Phil Harvey also provides a page on which he lists Ricoh-specific Exif tags. This page is quite useful for understand the output of the Exiftool application for images taken with Ricoh cameras like the Ricoh GXR. However, I found that Phil Harvey still does not include the focus-specific tags that Pavel Kudrys and I have revealed. Perhaps, I should send him an e-mail...

Links to ExifTool

Exif Links

DOFMaster

 

 

An den Anfang   Homepage  

gerd (at) waloszek (dot) de

About me
made by walodesign on a mac!
28.12.2015