SourceForge Home

JHeader Java EXIF/JFIF Header Library


JHeader is a Java library for reading and editing EXIF and JFIF headers in JPEG files. It also comes with a command line tool and a GUI tool.

Features include:

  • Display and edit any recognized EXIF tag
  • Add and remove EXIF tags
  • Convert JFIF files to EXIF and vice versa
  • Create and extract thumbnails from EXIF and JFIF headers
  • View and edit JPEG file comments
  • A command line tool for performing some operations
  • A GUI tool and a useful JTable component for performing some operations

The library is designed to make it simple to display, in a moderately attractive manner, all tags in a file without the programmer having to know what they are called or what their types are. Also, any EXIF tag can be set from a string. If the string cannot be parsed into the tag's required type (for example trying to assign text to a numeric tag), an exception is thrown.

The tags are moderately strongly typed: they are either Long, Double, String, Rational, DateTimeTag, UndefinedTag or a subclass of EnumeratedTag. It is possible to convert between tag types where it makes sense to do so. In particular, every type can be converted to and from a String.

Numeric tags which can take a discrete set of enumerated values have an associated type derived from the EnumeratedTag class. It defines the set of allowable values and allows the caller to list the allowable values, both as numbers and as a more user-friendly string. You don't have to use these classes - you can refer purely to the base EnumeratedTag class or else just fetch and edit the tag as a Long.


JHeader is written in Java and requires version 1.5 to compile and run. It requires ant to compile.

Building and Usage

See the README file in the distribution or the downloads area.


Copyright © 2006 Matthew Baker. Email m_baker@users.sourceforge.net.

Released under the GNU General Public Licence. See file LICENCE. To use this product in a closed-source product, please contact Matthew Baker on the above email address for information about licensing.