How Windows ate my EXIF data (and how I mostly fixed it)

The background

As we’ve already established, I love to take photos, and I have a strong bias toward digital. While I received my first digital camera (the aforementioned Game Boy Camera) on my birthday in 2000, it wasn’t until the following summer that I got my first “real” digicam, a Nikon Coolpix 775.

From there, the flood of digital photos began. Initially, I just dumped every photo into a single folder on my shiny, new, gonna-help-me-do-well-in-college-this-fall laptop, and let their sequential filenames (DSCN0001.JPG, 0002, etc.) do the “sorting.”

This worked for a while, until it became clear that having all of my photos in one folder was poor for both organization and performance, so I started organizing my photos using dated subfolders (e.g. photos/2001/2001-08-12/). This was all the organization I did for my photos, and was also how  I viewed them, up until I began using photo managing software (first Picasa on Windows, later F-Spot under Ubuntu).

The problem

While these apps excel at taking photos and turning them into a well-organized stream based on date taken, I noticed that a small handful of photos were out-of-place in the timeline.1

After spending some time puzzled by this, it occurred to me that:

  1. none of these photos had EXIF data
  2. all of these were taken in 2001
  3. all of these had been taken in “portrait” mode (when you turn the camera sideways), as opposed to “landscape”

In an example of clearly misguided, youthful indiscretion, I had manually rotated these photos—remember, cameras didn’t have orientation sensors back then—using Windows Picture & Fax Viewer (Windows ME/XP’s default), and it ate my photos’ EXIF data! From then on, I started using the camera’s built-in rotate functionality.

But, ugh, I still had a bunch of old, messed up photos. Fortunately, I wasn’t totally in the dark about these photos’ chronology, as I knew the correct dates that these photos were taken, thanks to the surrounding sequential photos still having their EXIF data.

The solution

For the last few years, I let these few photos just be, annoyed that they would always show up in the wrong places. So today, I finally did something about this: I gave them new EXIF data using the best information I had at my disposal.

While I didn’t know the precise time taken, I did have dates for these photos, so I figured giving them EXIF with the right date and wrong time was better than no date at all. I accomplished this using a pair of Linux programs: jhead and touch. Here’s how:

First, I created an EXIF tag for a given photo using jhead:

$ jhead -mkexif DSCN1282.JPG

Then, I touched the file (in Unix-y parlance, change the file’s “modified” timestamp) to midnight (00:00:00) on the appropriate date (e.g. August 12, 2001):

$ touch -t 200108120000.00 DSCN1228.JPG

Finally, I used jhead to change the file’s EXIF timestamp to the newly-fixed modified date:

$ jhead -dsft DSCN1282.JPG

Having re-added the problem images to my F-Spot library, the photos now appear more-or-less in the place they should. They’re now good enough that I’ll never again have to see those photos mixed in with the wrong year!

  1. I know what you’re thinking: that there were times when I forgot to set the date on my camera. Nope. No way. I never forget to set the date on my camera, because making sure my photos have the correct date and time is something that I’m a bit obsessive about, and the first thing I do after charging my camera’s battery is always check the date.[]

Warmth, fuzz at 60 MPH

Last Friday evening I was alone, driving south on one of South Florida’s fine expressways, when I had the strangest moment of, for lack of a better term, empathy.

(This is notable because the word with which I would expect myself to have ended that sentence is “contempt.”)

The driver in front of me, piloting a Mitsubishi that was either silver or gold (difficult to tell which in the half-light of the expressway’s overheard streetlights), wasn’t driving at a pace that was to my liking, so I decided I would pass them. I engaged my turn signal and began merging over to the next lane. They must have sensed, from the amount of time I had spent behind them, that they were not driving at a pace that was to my liking, so at the exact moment I started moving over, they too started moving over in the same direction I was. (Of course, they did so without signaling,1 which is the South Florida Standard.) Just as simultaneously as we began them, we aborted our lane changes, as we each noticed the other’s attempt.

It was at this moment that I felt a warm, fuzzy feeling, the likes of which I almost never experience while driving down here. In that moment, I became quite aware that there was a person driving that Mitsubishi. It’s easy to forget that the other cars on the road are driven by people, especially at night when it’s not so easy to see them through their windows. But in that driver’s moment of obvious self-correction, it could not be clearer.

Also, I will not let it go unsaid: the events that unfolded made it clear that the person in front of me actually looked in their mirror before attempting to change lanes! Their careful consideration only makes me aware that they were at least a bit like me.

Around here, that’s saying something.

  1. That’s fine, really. Had they signaled and done the other noted things, I would not be writing this post, because I would have died that night, from some sort of shock.[]

It’s fear, mostly.

Inc. Magazine: Why Is Business Writing So Awful?

When you write like everyone else and sound like everyone else and act like everyone else, you’re saying, “Our products are like everyone else’s, too.” Or think of it this way: Would you go to a dinner party and just repeat what the person to the right of you is saying all night long? Would that be interesting to anybody? So why are so many businesses saying the same things at the biggest party on the planet — the marketplace?

Fear, mostly.

(via Ryan)

Why doesn’t my phone have a thermometer?

It’s getting pretty warm again (did it ever stop?) in South Florida, so today when I had the misfortune of being outdoors, I got to wondering why with all the sensors found in most modern smartphones, they don’t usually include a thermometer.

It’s common to find sensors for orientation, screen contact/pressure, video, sound and even location. However, for some reason, the task of telling me about the climate surrounding me gets outsourced to a third-party that is somewhere completely different.

Just think about that for a second.

What we’re missing is the ability to know the actual conditions we’re experiencing. If one happens to be indoors, in the shade, or somewhere else entirely, all they’ll get from their phone is the typical outdoor temperature for their general area. Even if they happen to be inside of, and get reception in, a walk-in freezer. (“It’s certainly not 90° F in here…”)

On the other hand, I can think of reasons why our phones tend not to handle their own temperature readings. Wireless carriers obviously prefer that customers pay for data plans to use as many phone features as possible. There’s also the matter of expectations: nobody (but me!) seems to demand the feature, so why include it, even if the hardware couldn’t be all that pricey?

But most importantly, the sensor would likely be unduly influenced by the temperature of our hand, the atmospheric conditions in our pocket, the heat generated by the phone itself, and so on. Heck, I distinctly remember how wildly inaccurate my circa-mid-90s Casio G-Shock thermometer watch (same model pictured at right) was.

But gosh, was it ever entertaining to watch that dial spin! I also used to watch that bar graph scroll through the last few hours of recorded temperatures and pretend I was in a boat watching waves go by. Ah, childhood…

I can’t quite place my finger on what I would do with the ability to keep a reading of my own surroundings’ temperature over time… but I know I want it.