plug-ins: fix #7109 exported gimp .jpg not processable in Windows Photo Viewer

In cases where the whole EXIF MakerNote is invalid we still load that
MakerNote data and export it too, causing partial invalid EXIF metadata.
We don't need to explicitly save Exif.Photo.MakerNote at all, because
as soon as we try to save a brand specific tag exiv2 will create that
MakerNote tag itself.
So from now we don't save the MakerNote but only the tags that go in it.
In issues like #2159 where exiv2 doesn't parse all tags inside certain
brand specific MakerNotes correctly, we will still export invalid EXIF.
That is an exiv2 issue that we can't do much about unless we remove all
MakerNote metadata including those that we can read, which doesn't seem
like a good idea at all.
This commit is contained in:
Jacob Boerema 2021-11-21 18:39:35 -05:00
parent 7decb7d3af
commit 6840bb9eba
1 changed files with 12 additions and 1 deletions

View File

@ -143,7 +143,18 @@ static const gchar *unsupported_tags[] =
(PreviewResolution, PreviewLength, PreviewImageBorders) also make no sense because
we are not including a Pentax specific preview image. */
"Exif.Pentax.Preview",
"Exif.PentaxDng.Preview"
"Exif.PentaxDng.Preview",
/* Never save the complete brand specific MakerNote data. We load and
* should only save the specific brand tags inside the MakerNote.
* Sometimes the MakerNote is invalid or exiv2 doesn't know how to parse
* it. In that case we still get the (invalid) MakerNote, but not the
* individual tags or just a subset of them.
* If there are recognized brand specific tags, exiv2 will create the
* required MakerNote itself (which in can still be invalid but that's an
* exiv2 issue not ours). */
"Exif.Photo.MakerNote",
"Exif.MakerNote.ByteOrder",
"Exif.MakerNote.Offset",
};
static const guint8 minimal_exif[] =