Fixing messed-up metadata with exiftool

Posted on

Just a quick jot to spread the solution to a problem I was having.

I’m really enjoying using Darktable software to process my raw camera files when I’m not happy with the in-camera JPEG. It does happen, usually if the white balance is off or I’ve messed up the exposure, and to me this makes it worth shooting both raw and JPEG, even though it means I store thousands of huge raw files I’ll never actually use. (Aside: if Digikam starts allowing me to treat both the raw and the JPEG as the same picture for the purposes of tagging and rating, it’ll become much more efficient to remove unneeded files.)

I have a BASH script that does various things to my processed photos to prepare them for the web, including resizing with ImageMagick and writing artist info with ExifTool. ExifTool doesn’t like the JPEGs produced by Darktable from my Nikon D90’s NEF files, complaining:

Error: [minor] Bad GPS directory - mypic.jpg
0 image files updated
1 files weren't updated due to errors

I believe this is a manifestation of this known Darktable bug (apparently persisting in v0.9.1).

Just running exiftool -m [...] to tell ExifTool to ignore minor errors doesn’t get it past this error. The solution for me has been to get ExifTool to delete and rewrite the metadata, which is addressed in Question 20 in the ExifTool FAQs. So now I include the line

exiftool -all= -tagsfromfile @ -all:all -unsafe bad.jpg

before my next exiftool command, with the understanding that I may lose some metadata by doing this. I can always get it all back, if I want to, from the original photo file, which I never delete.

Really, it took me longer than it should have to find this, so I’m putting this up as a breadcrumb for sleep-deprived Googlers. Incidentally, my trail to the solution went via this forum thread where someone else with a D90 was having trouble with mangled metadata after processing photos with Picasa 3.8. Edit: I should point out that the forum post was answered helpfully by Phil Harvey, the author of ExifTool, himself, and that ExifTool is available for Linux, Windows, and Mac OS X. Good stuff.

A few things

Posted on

I don’t have anything cohesive to offer, so let’s have a handful of loosely-or-not-at-all-associated whatevers, just so I can feel as though I had some sort of product to show for some of my activity of late.

We’re just coming down from the longest stretch of really summery weather we’ve had this year. The summer baby we timed just a little bit late got to spend some bonus time outside in warm weather. So did our autumn-baby-that-was.

I like blog posts to have pictures in them. I won’t share any amusing photos of me charging back and forth along the narrow backyardgarden, in thick fleece pantstrousers and bulky sweaterjumper, playing soccerfootball with an almost-three-year-old who’s getting difficult to tackle without fouling. Actually, I hope you’ll agree that probably no such photos exist, because they wouldn’t be very flattering if they did. Here’s one that does exist.

There. (Spot the baby.)

I made a cake last night. It’s really chocolatey, really sweet, really moist, and really dense. This is because it has more chocolate than flour in it. And more butter than flour. And more than twice as much sugar as flour. And I had to stop baking it before the skewer came out clean because it was getting late and the baby was ready to sleep and this has become an important parameter in our operational decisions. This cake was so rich I started to feel sick before I could finish my small slice. And that’s saying something. F was able to finish his but he humoured my concern that he might overdose on sugar, butter, and/or chocolate if he had another.

At home this morning, I spoke to as many people as I likely would have spoken to if I’d gone out; to wit, the postman (briefly), the Avon lady (briefly), and a Jehovah’s Witness.

Today at lunchtime, I had the brilliant idea of using a dried-out piece of toast I’d left in the toaster at lunchtime yesterday as a source of croutons for my soup. Actually, it wasn’t that brillliant an idea.

Last thing for today: something beautiful, in case you missed it, like I did until a family member linked to it on Facebook (thanks, Doug!). Almost everyone reading this will have seen Doug’s link. Still.

 

 

Bonus! Beautiful health.

Posted on

In September 2011, I did a double-take:

I didn’t think I was ever going to see this again.

What is it? A healthy-looking horse chestnut tree.

A decade ago, when horse chestnut leaves started to turn in the autumn, it was a show of brilliant Rastafarian colours. Since then, most of the horse chestnut trees in the Cambridge area have been afflicted with something that turns the leaves brown in the summer and the show never happens. I’ve seen reference to fungus, bacteria, and leaf miner moths; I’m sure the leaf miners are active in this region, but I don’t know if it’s the main problem of all the trees.

Here’s a shot from September 2002:

Green and luscious. Not luscious for eating. I should find a better word, or stop thinking so literally…

Those fantastic spiny things contain the horse chestnuts, or conkers (these have cultural significance in the UK), for anyone reading who hasn’t seen this before.

One from October 2002:

Pow!

Here’s one from mid-June 2011:

Bleh. Looks like leaf miners. If every spot on those leaves represents one caterpillar, that’s a lot of caterpillars!

To make this post complete, I should really go and take a picture of an average-looking horse chestnut tree in September 2011. For now, just imagine all the leaves dry, shrivelled, and totally brown, next to other kinds of trees that haven’t really got going on changing their colours.

I guess it’s only a matter of time for this guy too, but I’m taking the 2011 show as a bonus…