Exif Jpeg header manipulation tool

Version 3.00   Updated Feb 2 2015

Usage documentation

Things jhead can extract from an Exif jpeg file
  • Time and date picture was taken
  • Camera make and model
  • 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
  • GPS info, if stored in image
  • IPTC header
  • XMP data
Things jhead can modify in an exif jpeg file
  • Up-right images according to rotation tag using jpegtran
  • Set or relative adjust internal exif timestamps
  • Fix date / time offsets in large batches of images
  • Re-name or date stamp files according to exif timestamp
  • Transfer exif headers between images
  • Replace thumbnails inside Exif headers
  • Edit jpeg comments (but not the Exif comments)
  • Delete exif or comment sections from jpeg images
  • Create new minimal exif header containing date and thumbnail
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. Many image browsers today make use of this integral thumbnail when browsing, while other browsers make their own thumbnails based on the image as a whole.

Because I am interested in photography, I am always curious just exactly what settings my fully automatic digital camera actually did end up using. Back in 1999, when I originally wrote jhead, I couldn't find a program that would consistently display the settings, nor one that could be compiled into a simple executable. I have since added many more features to jhead, many of them the result of suggestions or code contributions.

Though there are many programs out there now that can manipulate Exif headers today, for many tasks, jhead remains the simplest and most effective tool for the job, especially if used for automated or scripted tasks.

Sample jhead output:

    File name    : 0805-153933.jpg
    File size    : 463023 bytes
    File date    : 2001:08:12 21:02:04
    Camera make  : Canon
    Camera model : Canon PowerShot S100
    Date/Time    : 2001:08:05 15:39:33
    Resolution   : 1600 x 1200
    Flash used   : No
    Focal length :  5.4mm  (35mm equivalent: 36mm)
    CCD Width    : 5.23mm
    Exposure time: 0.100 s  (1/10)
    Aperture     : f/2.8
    Focus Dist.  : 1.18m
    Metering Mode: center weight
    Jpeg process : Baseline

The program also has a lot of other command line options for manipulating Exif files, such as options to manipulate the date in the header, renaming image files, or coordinating running Jpegtran and Mogrify to manipulate whole directory trees of images.

Here's the program files. Just right click and save as.

Current release version: 3.00 (Feb 2 2015)
Source tarball jhead-3.00.tar.gz (69 k)
Pre-built Windows executable jhead.exe (166 k)
Pre-built Linux executable (built on Centos)  jhead (77 k)
Pre-built OS-X Intel executable (version 2.97) jhead (24 k)
Older Versions
Source tarballs
jhead-2.97.tar.gz (68 k)
jhead-2.95.tar.gz (63 k)
jhead-2.95.tar.gz (64 k)
jhead-2.94.tar.gz (64 k)
jhead-2.93.tar.gz (64 k)
jhead-2.90.tar.gz (64 k)
jhead-2.88.tar.gz (63 k)
jhead-2.87.tar.gz (62 k)
jhead-2.86.tar.gz (62 k)
jhead-2.84.tar.gz (64 k)

There's also a change log

The software is public domain. A program this small is not worth bothering restricting anybody with, and I'm too lazy to look into the ramifications of GPL or BSD licenses. Besides, I hope more people integrate this sort of functionality into their programs, free or not free.

More on Exif on Wikipedia
and at: http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf

I started this tool in 1999 because I couldn't find a tool to do what I needed to do. Over the years, more sophisticated tools have been created, such as:
Exiftool (Amazingly many features, but slow because it's in perl)
libexif (C++ exif library)
exifv2 (Fast exif manipulation)

At this point, jhead's niche is not what it is, but what is is not. The jhead source code is about 10% the size of other tools, jhead is fast, small, and has no external dependencies. If jhead meets your needs, good. If it does not, read the manual more carefully, or try one of the more complex tools listed above. If you are trying to recover pictures from a corrupted flash card, try Photorec. (PhotoRec and jhead do very different things, but I have been asked about recovering files numerous times)

Got questions? Read the manual. If that doesn't answer your questions, you can contact me at:

The address is in the PNG file so no robot can pick it up (If you want to include contact information, refer to this page's URL, but please don't post my email address in machine readable forms on the web)

Other handy free utilities by Matthias Wandel:

    Ftpdmin A minimal install-free windows FTP server for ad-hoc file transfers. No setup, just run when needed.

    Finddupe Identify and eliminate duplicate files. Useful when organizing other people's photos.

Also check out my Home page, or my Woodworking website