HEIF "Can't currently decode encoded application/rdf+xml metadata"

Started by Marsu42, July 01, 2024, 08:13:50 PM

Previous topic - Next topic

Marsu42

When converting files with libheif's heif-enc, it's possible to compress the metadata with --enable-metadata-compression

However, current exiftool (12.87) doesn't supoort this and bugs out on any op on the metadata-compresed heic with "Can't currently decode encoded application/rdf+xml metadata".

Compressing metatdata saves a bit of file size, which is what image compression is all about, so it would be nice to have exiftool support this in the fullness of time.

Libheif itsself states "Note that header compression is not widely supported yet." https://github.com/strukturag/libheif

Attached are two heif images I converted - with and without compressed metadata.

Phil Harvey

Thanks for the suggestion and the sample.  ExifTool 12.88 will support reading and writing deflated HEIC metadata.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Marsu42

Quote from: Phil Harvey on July 01, 2024, 09:55:48 PMThanks for the suggestion and the sample. ExifTool 12.88 will support reading and writing deflated HEIC metadata.

Thanks. I'd like to mention that after heifenc with "--enable-metadata-compression", there must be no -zip on the exiftool command line or "Warning: Can't currently change compression when rewriting EXIF in HEIC"

Phil Harvey

That warning is informational only and may be ignored (I'll make it a minor warning in the next release).

ExifTool will create new XMP in an HEIC file as compressed if the -z option is used, but currently isn't able to change the compression of already existing XMP.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).