If you’re familiar with Picasaweb, then you probably know that it is very easy to geotag your photo’s from within your browser. I’ve used this functionality quite often, resulting in ~1000 geotagged images in my online albums. Unfortunately, this extra info is stuck, there is no way to get the geo information from Picasaweb to the pictures on my disk.
That’s why I started playing a bit with some EXIF libraries for Java. The amount of good libraries is unfortunately limited to two:
Both libraries work extremely well when it comes to reading metadata from a wide range of image types. MetaData Extractor is very powerful and is pure Java but it requires some EXIF knowledge. ExifTool on the other hand is relatively easy to use, but relies on the often praised ExifTool by Phil Harvey (which is not bad at all, but the library isn’t pure Java).
However, I found no Java library capable of writing EXIF data which meant that I had to do it myself. I decided to use ExifTool by Phil Harvey since it’s widely used and probably won’t corrupt my images. So a few hours later I had a working application which was capable of copying the GPS data from a set of images to another set of images.
I’ve used the KISS principle for this application. No generics, no factories, just plain and simple Java code.
You can download the source at BitBucket .