Jhead 2.5 review

by rbytes.net on

The files coming out of a pretty much all Digital cameras are in the Exif flavour of Jpeg files.

License: Freeware
OS: Mac OS X
File size: 59K
Developer: Matthias Wandel
Price: $0.00
Updated: 13 Jul 2006
0 stars award from rbytes.net

The files coming out of a pretty much all Digital cameras are in the Exif flavour of Jpeg files. Exif files are for the most part Jpeg files, but start with a different header block, and contain additional data sections with camera settings, as well as a preview thumbnail picture as part of the Exif header. Most editing / viewing software just skips past the Exif header and ignores it outright, so you normally don't notice its even there.

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.

Here are some key features of "Jhead":
Integral low-res Exif thumbnail
Shutter speed
Camera F-stop number
Flash used (yes/no)
Distance camera was focused at
Focal length and calculate 35 mm equivalent focal length
Image resolution
Time and date picture was taken
Camera make and model
Up-right images according to rotation tag using jpegtran
Set or relative adjust internal exif timestamps
Re-name or date stamp fils according to exif timestamp
Transfer exif headers between images
Edit jpeg comments
Delete exif or comment sections from jpeg images

What's New:
Added -rgt (regenerate thumbnail) feature.
Added -orp and -orl options.

Jhead 2.5 search tags