[gimp] plug-ins: file-tiff-save looks for the wrong exif tags to delete.
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: file-tiff-save looks for the wrong exif tags to delete.
- Date: Fri, 23 Oct 2020 16:56:13 +0000 (UTC)
commit c10bb098b4c3ef83dbc859acb58d1a59d286c7ee
Author: Jacob Boerema <jgboerema gmail com>
Date: Fri Oct 23 12:46:34 2020 -0400
plug-ins: file-tiff-save looks for the wrong exif tags to delete.
The correct tag for sub images is Exif.SubImage instead of
Exif.Image. I also added Exif.Image.InterColorProfile since
that didn't seem to get deleted when saving without
color profile.
Also added a FIXME note since most of this stuff should be
genealized for all gimpmetadata handling.
plug-ins/file-tiff/file-tiff-save.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index adc527da3d..7d3bcd5f90 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -867,6 +867,10 @@ save_thumbnail (GimpImage *image,
g_object_unref (thumb_pixbuf);
}
+/* FIXME Most of the stuff in save_metadata except the
+ * thumbnail saving should probably be moved to
+ * gimpmetadata.c and gimpmetadata-save.c.
+ */
static void
save_metadata (GFile *file,
GObject *config,
@@ -885,11 +889,12 @@ save_metadata (GFile *file,
*/
static const gchar *exif_tags_to_remove[] =
{
- "Exif.Image.0x0118",
- "Exif.Image.0x0119",
- "Exif.Image.0x011d",
+ "Exif.Image.0x0118", /* MinSampleValue */
+ "Exif.Image.0x0119", /* MaxSampleValue */
+ "Exif.Image.0x011d", /* PageName */
"Exif.Image.Compression",
"Exif.Image.FillOrder",
+ "Exif.Image.InterColorProfile",
"Exif.Image.NewSubfileType",
"Exif.Image.PageNumber",
"Exif.Image.PhotometricInterpretation",
@@ -913,9 +918,9 @@ save_metadata (GFile *file,
exif_tags = gexiv2_metadata_get_exif_tags (GEXIV2_METADATA (metadata));
for (char **tag = exif_tags; *tag; tag++)
{
- if (g_str_has_prefix (*tag, "Exif.Image")
- && (*tag)[strlen ("Exif.Image")] >= '0'
- && (*tag)[strlen ("Exif.Image")] <= '9')
+ if (g_str_has_prefix (*tag, "Exif.SubImage")
+ && (*tag)[strlen ("Exif.SubImage")] >= '0'
+ && (*tag)[strlen ("Exif.SubImage")] <= '9')
gexiv2_metadata_clear_tag (GEXIV2_METADATA (metadata), *tag);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]