I’ve been rewriting my multiple exposure software (again—the code was totally unmaintainable and totally horrible). I decided to switch from
exiv2 to the excellent
pyexiftool for reading and writing image metadata.
exiv2 is good! But
exiftool is compatible with raw images from more camera systems.
I didn’t have any tests so I failed to maintain the functionality of my old metadata writing tool. I couldn’t figure out why neither Lightroom nor Flickr could read the “Capture Time” I was attempting to set in metadata. I searched around and found this forum post where I learned that Lightroom writes one EXIF tag, two IPTC tags, and one XMP tag that all include the “Capture Time” metadata.
Let’s unpack that just a tiny bit: there are three different metadata standards and one of them splits the date and the time into two separate items. Why!
The one Flickr pays attention to is
EXIF:DateTimeOriginal. I had been writing
Composite:DateTimeCreated, which apparently means something to
exiv2 but nothing to
exiftool. Maybe the
exiv2 method writes all four tags like Lightroom but I’m too lazy to check.
I also had some trouble making newlines in captions—ultimately because of how
pyexiftool wraps the
exiftool CLI and how the
exiftool CLI uses line feeds—but it is possible if you use a carriage return instead of a line feed.
If EXIF orientation handling is a ghetto, it’s a small part of the tri-standard urban wasteland that is photo metadata. Documentation is sparse and hard to come by, but thankfully the
exiftool forum has been an oasis.