Support for displaying HEIC metadata (date, time, GPS)
With #36 (closed) fixed, and (on Ubuntu) the heif-gdk-pixbuf
package, viewing HEIF/HEIC files with EoG works fine. However, metadata (date/time of photo taken, GPS position, etc...) is not displayed at all.
Looking at the sources, it looks like eog-metadata-reader.{c,h}
is used as abstraction in EoG to read metadata, and it has implementations for JPG and PNG metadata only (with mostly custom implementations, using libexif
, lcms
and exempi
for some of the lower devel details).
exiftool has support for reading HEIC image data, but a quick Google search brings up this eog-list post from 2005 which suggests that implementing an "eog-metadata-reader-exiftool" that runs exiftool
(which does have a -json
option for outputting machine-readable metadata as JSON for tool consumption) as subprocess is probably not desirable -- is this still true?
Anyway, exiftool -verbose somefile.heic
can be used to see how exiftool understands and interprets the container format, it seems to contain both Exif and XMP information.
The exiftool implementation of HEIC metadata reading is here: https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/QuickTime.pm
Based on that, it seems like ISO ISO 14496-12:2015 parsing would be needed. A quick Google search doesn't bring up anything obvious that would be able to parse QTFF metadata with a GLib-style interface. I have found qtdemux_tags.c
in gst-plugins-good
, but not sure if it would work for HEIF metadata easily and if EoG wants to link against GStreamer just for image metadata.
I also wanted to check if GNOME Photos can show metadata and if EoG could reuse or share metadata parsing from it, but it crashes when trying to open HEIF photos (seems like there's no GEGL support for HEIF yet).
Does it even make sense to put HEIC metadata parsing into EoG (would patches be accepted) or should this e.g. live in Tracker instead and EoG grabs information from there and displays it, so that e.g. the "Image" metadata panel in Nautilus can also show this metadata?