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.

Making a sketch into vector art using Inkscape

Posted on

I noticed a flurry of excitement on Twitter over a new product from Wacom called the Inkling, a combination of a pressure-sensitive ballpoint pen and a doodad that clips onto the top of your sketchbook and records the position of the pen by detecting inaudible sound pulses emitted by the pen. The position and pressure data are recorded and the sketch reconstructed in software.

I archive doodles using my camera; there’s a higher chance I’ll see them again if they’re on the computer, especially if I tag them as sketches in Digikam. The Inkling might streamline this process and enhance it with easy conversion into vector graphics and the ability to switch layers (so a rough sketch can be separated from refinements drawn over it). Having to find the doohickey and clip it onto a sketchpad before starting any sketch might be enough hassle that I’d reach for a more gratifying-to-use pencil, pen, or brush, though, and then I’d have to take my photo anyway.

Using a standard ballpoint refill may make sense, all things considered, but it’s not the most pressure-sensitive of drawing instruments. The physical pen sketch on the page can’t reflect anything interesting the software might do with the pressure data, like varying linewidth or opacity, as suggested by images here and here respectively. I imagine that with practice one could visualize the intended effect, but to my mind it’s quite a compromise. It will be interesting to see when hands-on reviews start cropping up.

So, that all said, I’m not the intended audience for the Inkling, but I had been following the countdown to the unveiling of a new product from Wacom, hoping for a pressure-sensitive stylus for capacitive touchscreen devices (like my Asus Transformer or an iPad). When I saw that the new product is for digitizing drawings made on paper, I was inspired to test how easy it is to vectorize a photo of a drawing by getting the free vector graphics program Inkscape to trace it. Now, I’m a complete Illustrator ignorant, and I haven’t spent a lot of time with Inkscape either, so the nuances of working with vector graphics escape me completely. The result of this process may be non-ideal for most people’s applications. I ran through it just to see what would happen.

Here’s a doodle I’d made during a landmark first (and probably only, ever, with autumn just about upon us and G approaching three years of age) coincidence of warm, sunny weather and both children sleeping. I should really have made a pen or brush sketch for this, I suppose.

Import into Inkscape and go to Path->Trace Bitmap… I chose a single scan with brightness threshold 0.880.

A different trace, this time using several levels of grey (I chose 4), followed by a Path->Simplify operation:

These examples were carried out without optimizing the settings, but I was impressed. My low-contrast doodle was made into an SVG file, with vectory shapes with nodes you can tweak, and no limit on their resolution. They look like something you could make something out of. Incidentally, the inkscape tutorials weblog is a good general Inkscape resource, with links to some really neat tutorials.

I like taking pictures

Posted on

image

This photo is pretty unremarkable, except in that it’s the first one I’ve taken in about a month that doesn’t look like this:

image

On another topic, this post is taking an awfully long time to write, for technological reasons. The photos were processed on my desktop computer (Mandriva Linux), but from there I wanted to see if it was practical to write a post on an Asus Transformer tablet running Android Honeycomb. For the nonce, let’s just say I ran into some issues. I hope to follow up with some details, perhaps typed out on a physical keyboard. I’m determined to finish this post on the tablet.