[gthumb/ext] allow to save metadata only for jpeg and png images



commit 0f3b7da2d1a66dc2157e14bb59e1e07edb772be1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Sep 9 15:30:24 2009 +0200

    allow to save metadata only for jpeg and png images
    
    [bug #594515]

 extensions/exiv2/gth-metadata-provider-exiv2.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/extensions/exiv2/gth-metadata-provider-exiv2.c b/extensions/exiv2/gth-metadata-provider-exiv2.c
index 4733951..68513c9 100644
--- a/extensions/exiv2/gth-metadata-provider-exiv2.c
+++ b/extensions/exiv2/gth-metadata-provider-exiv2.c
@@ -87,6 +87,12 @@ gth_metadata_provider_exiv2_write (GthMetadataProvider *self,
 	GError  *error = NULL;
 	GObject *metadata;
 
+	if (! g_content_type_equals (gth_file_data_get_mime_type (file_data), "image/jpeg")
+	    && ! g_content_type_equals (gth_file_data_get_mime_type (file_data), "image/png"))
+	{
+		return;
+	}
+
 	if (! g_load_file_in_buffer (file_data->file, &buffer, &size, &error))
 		return;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]