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

The background

As we’ve al­ready es­tab­lished, I love to take pho­tos, and I have a strong bias to­ward dig­i­tal. While I re­ceived my first dig­i­tal cam­era (the afore­men­tioned Game Boy Camera) on my birth­day in 2000, it wasn’t un­til the fol­low­ing sum­mer that I got my first “re­al” digi­cam, a Nikon Coolpix 775.

From there, the flood of dig­i­tal pho­tos be­gan. Initially, I just dumped every pho­to in­to a sin­gle fold­er on my shiny, new, gonna-help-me-do-well-in-college-this-fall lap­top, and let their se­quen­tial file­names (DSCN0001.JPG, 0002, etc.) do the “sort­ing.”

This worked for a while, un­til it be­came clear that hav­ing all of my pho­tos in one fold­er was poor for both or­ga­ni­za­tion and per­for­mance, so I start­ed or­ga­niz­ing my pho­tos us­ing dat­ed sub­fold­ers (e.g. photos/2001/2001-08-12/). This was all the or­ga­ni­za­tion I did for my pho­tos, and was al­so how  I viewed them, up un­til I be­gan us­ing pho­to man­ag­ing soft­ware (first Picasa on Windows, lat­er F-Spot un­der Ubuntu).

The problem

While these apps ex­cel at tak­ing pho­tos and turn­ing them in­to a well-organized stream based on date tak­en, I no­ticed that a small hand­ful of pho­tos were out-of-place in the time­line.1

After spend­ing some time puz­zled by this, it oc­curred to me that:

  1. none of these pho­tos had EXIF da­ta
  2. all of these were tak­en in 2001
  3. all of these had been tak­en in “por­trait” mode (when you turn the cam­era side­ways), as op­posed to “land­scape”

In an ex­am­ple of clear­ly mis­guid­ed, youth­ful in­dis­cre­tion, I had man­u­al­ly ro­tat­ed these pho­tos — re­mem­ber, cam­eras didn’t have ori­en­ta­tion sen­sors back then — us­ing Windows Picture & Fax Viewer (Windows ME/XP’s de­fault), and it ate my pho­tos’ EXIF da­ta! From then on, I start­ed us­ing the camera’s built-in ro­tate func­tion­al­i­ty.

But, ugh, I still had a bunch of old, messed up pho­tos. Fortunately, I wasn’t to­tal­ly in the dark about these pho­tos’ chronol­o­gy, as I knew the cor­rect dates that these pho­tos were tak­en, thanks to the sur­round­ing se­quen­tial pho­tos still hav­ing their EXIF da­ta.

The solution

For the last few years, I let these few pho­tos just be, an­noyed that they would al­ways show up in the wrong places. So to­day, I fi­nal­ly did some­thing about this: I gave them new EXIF da­ta us­ing the best in­for­ma­tion I had at my dis­pos­al.

While I didn’t know the pre­cise time tak­en, I did have dates for these pho­tos, so I fig­ured giv­ing them EXIF with the right date and wrong time was bet­ter than no date at all. I ac­com­plished this us­ing a pair of Linux pro­grams: jhead and touch. Here’s how:

First, I cre­at­ed an EXIF tag for a giv­en pho­to us­ing jhead:

$ jhead -mkexif DSCN1282.JPG

Then, I touched the file (in Unix-y par­lance, change the file’s “mod­i­fied” time­stamp) to mid­night (00:00:00) on the ap­pro­pri­ate date (e.g. August 12, 2001):

$ touch -t 200108120000.00 DSCN1228.JPG

Finally, I used jhead to change the file’s EXIF time­stamp to the newly-fixed mod­i­fied date:

$ jhead -ds­ft DSCN1282.JPG

Having re-added the prob­lem im­ages to my F-Spot li­brary, the pho­tos now ap­pear more-or-less in the place they should. They’re now good enough that I’ll nev­er again have to see those pho­tos mixed in with the wrong year!

  1. I know what you’re think­ing: that there were times when I for­got to set the date on my cam­era. Nope. No way. I nev­er for­get to set the date on my cam­era, be­cause mak­ing sure my pho­tos have the cor­rect date and time is some­thing that I’m a bit ob­ses­sive about, and the first thing I do af­ter charg­ing my camera’s bat­tery is al­ways check the date.

Warmth, fuzz at 60 MPH

Last Friday evening I was alone, dri­ving south on one of South Florida’s fine ex­press­ways, when I had the strangest mo­ment of, for lack of a bet­ter term, em­pa­thy.

(This is no­table be­cause the word with which I would ex­pect my­self to have end­ed that sen­tence is “con­tempt.”)

The dri­ver in front of me, pi­lot­ing a Mitsubishi that was ei­ther sil­ver or gold (dif­fi­cult to tell which in the half-light of the expressway’s over­heard street­lights), wasn’t dri­ving at a pace that was to my lik­ing, so I de­cid­ed I would pass them. I en­gaged my turn sig­nal and be­gan merg­ing over to the next lane. They must have sensed, from the amount of time I had spent be­hind them, that they were not dri­ving at a pace that was to my lik­ing, so at the ex­act mo­ment I start­ed mov­ing over, they too start­ed mov­ing over in the same di­rec­tion I was. (Of course, they did so with­out sig­nal­ing,1 which is the South Florida Standard.) Just as si­mul­ta­ne­ous­ly as we be­gan them, we abort­ed our lane changes, as we each no­ticed the other’s at­tempt.

It was at this mo­ment that I felt a warm, fuzzy feel­ing, the likes of which I al­most nev­er ex­pe­ri­ence while dri­ving down here. In that mo­ment, I be­came quite aware that there was a per­son dri­ving that Mitsubishi. It’s easy to for­get that the oth­er cars on the road are dri­ven by peo­ple, es­pe­cial­ly at night when it’s not so easy to see them through their win­dows. But in that driver’s mo­ment of ob­vi­ous self-correction, it could not be clear­er.

Also, I will not let it go un­said: the events that un­fold­ed made it clear that the per­son in front of me ac­tu­al­ly looked in their mir­ror be­fore at­tempt­ing to change lanes! Their care­ful con­sid­er­a­tion on­ly makes me aware that they were at least a bit like me.

Around here, that’s say­ing some­thing.

  1. That’s fine, re­al­ly. Had they sig­naled and done the oth­er not­ed things, I would not be writ­ing this post, be­cause 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 every­one else and sound like every­one else and act like every­one else, you’re say­ing, “Our prod­ucts are like every­one else’s, too.” Or think of it this way: Would you go to a din­ner par­ty and just re­peat what the per­son to the right of you is say­ing all night long? Would that be in­ter­est­ing to any­body? So why are so many busi­ness­es say­ing the same things at the biggest par­ty on the plan­et —  the mar­ket­place?

Fear, most­ly.

(via Ryan)

Why doesn’t my phone have a thermometer?

It’s get­ting pret­ty warm again (did it ever stop?) in South Florida, so to­day when I had the mis­for­tune of be­ing out­doors, I got to won­der­ing why with all the sen­sors found in most mod­ern smart­phones, they don’t usu­al­ly in­clude a ther­mome­ter.

It’s com­mon to find sen­sors for ori­en­ta­tion, screen contact/pressure, video, sound and even lo­ca­tion. However, for some rea­son, the task of telling me about the cli­mate sur­round­ing me gets out­sourced to a third-party that is some­where com­plete­ly dif­fer­ent.

Just think about that for a sec­ond.

What we’re miss­ing is the abil­i­ty to know the ac­tu­al con­di­tions we’re ex­pe­ri­enc­ing. If one hap­pens to be in­doors, in the shade, or some­where else en­tire­ly, all they’ll get from their phone is the typ­i­cal out­door tem­per­a­ture for their gen­er­al area. Even if they hap­pen to be in­side of, and get re­cep­tion in, a walk-in freez­er. (“It’s cer­tain­ly not 90° F in here…”)

On the oth­er hand, I can think of rea­sons why our phones tend not to han­dle their own tem­per­a­ture read­ings. Wireless car­ri­ers ob­vi­ous­ly pre­fer that cus­tomers pay for da­ta plans to use as many phone fea­tures as pos­si­ble. There’s al­so the mat­ter of ex­pec­ta­tions: no­body (but me!) seems to de­mand the fea­ture, so why in­clude it, even if the hard­ware couldn’t be all that pricey?

But most im­por­tant­ly, the sen­sor would like­ly be un­du­ly in­flu­enced by the tem­per­a­ture of our hand, the at­mos­pher­ic con­di­tions in our pock­et, the heat gen­er­at­ed by the phone it­self, and so on. Heck, I dis­tinct­ly re­mem­ber how wild­ly in­ac­cu­rate my circa-mid-90s Casio G-Shock ther­mome­ter watch (same mod­el pic­tured at right) was.

But gosh, was it ever en­ter­tain­ing to watch that di­al spin! I al­so used to watch that bar graph scroll through the last few hours of record­ed tem­per­a­tures and pre­tend I was in a boat watch­ing waves go by. Ah, child­hood…

I can’t quite place my fin­ger on what I would do with the abil­i­ty to keep a read­ing of my own sur­round­ings’ tem­per­a­ture over time… but I know I want it.