Thursday, September 16, 2010

Changing employers

So I've changed employers this month. I had not done that since 1993...which was essentially before the World Wide Web even existed (except on a very limited basis).

I had essentially run out of billable work for the foreseeable future where I was the last 17 years. Sad, but true. I'd been doing solo stuff most of the last several years, was disconnected from other things.

Now was a good time to do the change. I recall when my dad retired from the USAF he said to me at the time: Want to be able to say I can do at least ten years with a commercial employer, and staying in the USAF for the remaining possible 5 years would violate that idea.

So for me, retirement is approaching at about that same pace. Dad was a year older, was planning to officially retire at 65 no matter what. I expect to have to go closer to 70; while that's still a ways off, it's a lot closer than the beginning of my professional career (1978).

Key thing with new employer is whether the work will be enjoyable. At the moment, it looks so for the next several years.

Wednesday, September 15, 2010

Java and EXIF data

I have recently needed to try to read EXIF data from Java. Easier said than done, unfortunately, and finding out how was not easy.

A few months ago I dug up what looked like a good approach, but it's old code (~2002), and calls classes/methods that are no longer accessible. I think they're still present in the runtime, but you can't use them yourself.

So I went hunting again, today. Found something called Imagero, which claimed to read the EXIF, but it didn't really look like it did, and the license statement was too burdensome.

Something called JExifViewer also looks good. It's a little bit too much GUI as opposed to callable functions, but it does seem to work ok.

I also found this:

Java Forum Link

which explains how to do it relatively easily.

The key thing is that you have to install a separate tool (the TIFF tool), and that turns out to have a quirk in that there are multiple variations, and you really need to install the JDK variation *and* the JRE version, because you probably aren't running your code in Eclipse from the runtime in the JDK.

Anyway, the code in the forum works great, does exactly what you are hoping for, and this code is way smaller once you install the other library (which comes from Sun anyway, so it's a good thing to go ahead and do).

The only flaw with all this is that EXIF data is most non-standardized, there are implementation inconsistencies...you know the drill, and it only applies to a few file formats, primarily JPG.

-----------

Later: well, this bit of java code is less than perfect. I was able to break it pretty quickly.

Looks like "exiftool" is the better approach, as a callable program.