The past couple of weeks we’ve seen new interest in gexiv2, the photo metadata library Yorba developed specifically for Shotwell Photo Manager. The reason? GIMP has adopted gexiv2 (and therefore Exiv2) for their photo metadata needs.
So what is gexiv2, and how is it related to Exiv2, beyond the name past the initial “g-“?
In 2010, as Yorba was adding features and expanding file format support in Shotwell, we realized its photo metadata support was lacking. Shotwell was using libexif, a workable but spare library that only offered support for (surprise) Exif, one of three major photo metadata formats. The other two (IPTC and XMP) are not nearly as widely-used as Exif, in particular with JPEGs, but are still out there and needed to be supported.
So we started looking around for alternatives. We found our solution in Exiv2, a Swiss army knife for photo metadata. There was a problem: Exiv2 is written in C++, a language we can’t directly call from Vala. We needed an adapter of some kind, a C-to-C++ bridge. It would be even better if that adapter spoke GObject. We began to hash out how such a wrapper might work.
It turned out someone was one step ahead of us. Mike Gemünde had started a project called gexiv2 that wrapped Exiv2’s C++ with a C GObject interface — perfect! (The original repository is still available here.) It was incomplete, so we contacted him asking if we could contribute. Mike was focused on a C# photo metadata library and suggested we take gexiv2 over. We’ve been developing it since.
It’s been great working with the GIMP developers so far, in particular Michael Natterer and Jehan Pagès. We’ve received two significant patches from them, including a rework to move gexiv2 to autotools. This in turn allows gexiv2 to build on Windows, something we’d not targeted at all when we began development but is obviously a hard requirement for GIMP.
I’m certain there are a lot more work and improvements to come. Shotwell has gotten plenty of mileage out of Exiv2, but GIMP will definitely exercise all its control paths.