Because I am interested in photography, I am always curious just exactly what settings my fully automatic digital camera actually did end up using. There's a few programs out there that can parse some of these headers, but I couldn'd find one that I could compile to an executable, and none that actually figured out what the camera settings were from the various confusing ways in which the fields can be expressed. Parsing the data of interest out of an Exif header is not straightforward. There is a large number of ways that simple data such as shutter speed or aperture setting can be expressed in inside of an Exif header. It can be an integer of various forms, or a fraction or floating point, which must subsequently be raised to a power to get the true value. Then it can be stored big-endian or little endian, and there are different fields for expressing the same values! It sounds like complete eveolutionary anarchy, but I think its just a comitee designed spec. With all its complexity, interestingly enough, plain text ASCII would both be smaller in size and easier to parse! So I wrote this command line driven program to parse through the little file system in the Exif headers and extract the stuff I really care about: What the digital camera settings really were.
The other thing I realized is that the files coming out of most digital cameras contain an integral thumbnail as part of the Exif header. This thumbnail is used for flipping through really tiny images on the LCD, although most cameras, when viewing just one image on the LCD don't use it (too little detail). This thumbnail takes up typically around 10k of data in the header. Once the picture is off the camera, even the software that comes with the camera doesn't use the thumbnail in the file, so its really just wasted space. So I added an option (-dt option) that reads the whole Jpeg image, figures out where the useful part of the Exif header ends, discards the thumbnail, and saves it back to disk. where the thumbnail is, and writes everything (including the rest of the Exif header) back Result: 10k space savings, with all the important information, including the digital camera information in the exif header intact. No loss of image quality, and very fast. So far all software I tried, including the software that comes with the digital cameras, has worked fine, and is still able to parse the Exif header.
For novice unix and OS-X users: Don't forget to set the executable bit after downloading the pre-built executables. Type "chmod +x jhead" at a shell window after downloading it to do this. You don't have to do this if you use one of the RPM packages.
Subscribe for our newsletter with best Mac offers from MacUpdate.
How would you rate Jhead app?
3 Reviews of Jhead
Most helpful