J-Exiftool: read and write Exif tags in Java

A while ago I started looking for a Java library which allowed me to read Exif-tags. It quickly turned out that the best implementations relied on the Perl executable ExifTool  by Phil Harvey and a quick look at the documentation told me why: it’s super awesome, it’s super reliable and after many years of development it’s still being updated ! However, this could not be said off the Java libraries which use Exiftool: none of them support writing Exif-tags and only a few are still being developed.

This is where J-ExifTool comes in: it’ll be the first Java-library which allows you to read and write Exif-tags by using the ExifTool  by Phil Harvey. The read functionality is already working pretty okay tough a lot of details are still missing (like formatting and casting the results).

Some of the goals of J-ExifTool are:

  • Java 7
  • High performance for processing batches of images
  • Easy to use
  • Open-Source
  • Well documented and correct code (IntelliJ Code inspection + FindBugs + Checkstyle)
  • A s***-load of logging

If everything is working correctly, reading an Exif-tags using J-ExifTool should be as simple as:

System.setProperty(ExecutionConstant.EXIFTOOLPATH, "lib\\exiftool.exe");
JExifTool tool = new JExifTool();
JExifInfo info = tool.getInfo(new File("D:\\Users\\pw999\\Documents\\Development\\Bitbucket\\j-exiftool\\lib\\DSC00216.JPG"));
String iso = info.get(Tag.ISO);

Update: if simplified, as suggested by Phil Harvey, the usage of the API. What I’ve started was oriented too much towards batch-processing (internally it still is, but you can’t use it anymore).
What’s left is more easy and straigtforward to use.