gthumb r2314 - in trunk: . src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2314 - in trunk: . src
- Date: Mon, 7 Apr 2008 19:51:35 +0100 (BST)
Author: mjc
Date: Mon Apr 7 19:51:35 2008
New Revision: 2314
URL: http://svn.gnome.org/viewvc/gthumb?rev=2314&view=rev
Log:
2008-04-07 Michael J. Chudobiak <mjc svn gnome org>
* src/dlg-convert.c: (save_image_and_remove_original):
* src/gth-batch-op.c: (pixbuf_op_done_cb):
* src/rotation-utils.c: (apply_transformation_generic):
Copy metadata from old file to new file during file conversions,
batch operations, and generic rotations. Bug #323943.
Modified:
trunk/ChangeLog
trunk/src/dlg-convert.c
trunk/src/gth-batch-op.c
trunk/src/rotation-utils.c
Modified: trunk/src/dlg-convert.c
==============================================================================
--- trunk/src/dlg-convert.c (original)
+++ trunk/src/dlg-convert.c Mon Apr 7 19:51:35 2008
@@ -44,7 +44,7 @@
#include "pixbuf-utils.h"
#include "file-utils.h"
#include "dlg-save-image.h"
-
+#include "gth-exif-utils.h"
#define CONVERT_GLADE_FILE "gthumb_convert.glade"
#define PROGRESS_GLADE_FILE "gthumb_png_exporter.glade"
@@ -247,14 +247,18 @@
GError *error = NULL;
char *local_file;
FileData *fd;
+ FileData *fd_old;
if (path_is_file (data->new_path))
file_unlink (data->new_path);
+ fd_old = (FileData*) data->current_image->data;
+ update_metadata (fd_old);
+
local_file = get_cache_filename_from_uri (data->new_path);
if (! _gdk_pixbuf_savev (data->pixbuf,
local_file,
- NULL, /* TODO: data->current_image->data->metadata ? */
+ fd_old->metadata,
data->image_type,
data->keys,
data->values,
@@ -266,6 +270,7 @@
return;
}
g_free (local_file);
+ file_data_unref (fd_old);
fd = file_data_new (data->new_path, NULL);
update_file_from_cache (fd, save_image_and_remove_original_step2, data);
Modified: trunk/src/gth-batch-op.c
==============================================================================
--- trunk/src/gth-batch-op.c (original)
+++ trunk/src/gth-batch-op.c Mon Apr 7 19:51:35 2008
@@ -463,6 +463,7 @@
{
GError *error = NULL;
FileData *fd;
+ FileData *fd_old;
char *local_file;
if (! completed) {
@@ -470,10 +471,13 @@
return;
}
+ fd_old = (FileData*) PD(bop)->current_image->data;
+ update_metadata (fd_old);
+
local_file = get_cache_filename_from_uri (PD(bop)->new_path);
if (! _gdk_pixbuf_savev (pixop->dest,
local_file,
- NULL, /* TODO: is this OK? No metadata? */
+ fd_old->metadata,
PD(bop)->image_type,
PD(bop)->keys,
PD(bop)->values,
@@ -485,6 +489,7 @@
return;
}
g_free (local_file);
+ file_data_unref (fd_old);
fd = file_data_new (PD(bop)->new_path, NULL);
update_file_from_cache (fd, save_image_and_remove_original_step2, bop);
Modified: trunk/src/rotation-utils.c
==============================================================================
--- trunk/src/rotation-utils.c (original)
+++ trunk/src/rotation-utils.c Mon Apr 7 19:51:35 2008
@@ -263,7 +263,8 @@
image_type = file->mime_type + 6;
local_file = get_cache_filename_from_uri (file->path);
-
+
+ update_metadata (file);
success = _gdk_pixbuf_save (transformed_pixbuf,
local_file,
file->metadata,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]