[gthumb] fixed saving of images rotated by the embedded orientation
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed saving of images rotated by the embedded orientation
- Date: Sat, 31 Jul 2010 17:29:01 +0000 (UTC)
commit 0c5f71f298c8df65d4a3e8de998f47256e7394ca
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jul 31 19:11:37 2010 +0200
fixed saving of images rotated by the embedded orientation
the embedded orientation was considered twice
extensions/importer/gth-import-task.c | 29 +++++-----------------
extensions/webalbums/gth-web-exporter.c | 39 +++++++++---------------------
2 files changed, 19 insertions(+), 49 deletions(-)
---
diff --git a/extensions/importer/gth-import-task.c b/extensions/importer/gth-import-task.c
index 0cab867..7f2647a 100644
--- a/extensions/importer/gth-import-task.c
+++ b/extensions/importer/gth-import-task.c
@@ -264,28 +264,13 @@ write_buffer_ready_cb (void **buffer,
}
if (self->priv->adjust_orientation && gth_main_extension_is_active ("image_rotation")) {
- GthMetadata *metadata;
-
- metadata = (GthMetadata *) g_file_info_get_attribute_object (self->priv->destination_file->info, "Embedded::Image::Orientation");
- if (metadata != NULL) {
- const char *value;
-
- value = gth_metadata_get_raw (metadata);
- if (value != NULL) {
- GthTransform transform;
-
- transform = (GthTransform) strtol (value, (char **) NULL, 10);
- if (transform != 1) {
- apply_transformation_async (self->priv->destination_file,
- transform,
- JPEG_MCU_ACTION_ABORT,
- gth_task_get_cancellable (GTH_TASK (self)),
- transformation_ready_cb,
- self);
- appling_tranformation = TRUE;
- }
- }
- }
+ apply_transformation_async (self->priv->destination_file,
+ GTH_TRANSFORM_NONE,
+ JPEG_MCU_ACTION_ABORT,
+ gth_task_get_cancellable (GTH_TASK (self)),
+ transformation_ready_cb,
+ self);
+ appling_tranformation = TRUE;
}
if (! appling_tranformation)
diff --git a/extensions/webalbums/gth-web-exporter.c b/extensions/webalbums/gth-web-exporter.c
index a720f92..e7a466a 100644
--- a/extensions/webalbums/gth-web-exporter.c
+++ b/extensions/webalbums/gth-web-exporter.c
@@ -2456,33 +2456,18 @@ copy_current_file (GthWebExporter *self)
if (gth_main_extension_is_active ("image_rotation")
&& g_content_type_equals (gth_file_data_get_mime_type (image_data->file_data), "image/jpeg"))
{
- GthMetadata *metadata;
-
- metadata = (GthMetadata *) g_file_info_get_attribute_object (image_data->file_data->info, "Embedded::Image::Orientation");
- if (metadata != NULL) {
- const char *value;
-
- value = gth_metadata_get_raw (metadata);
- if (value != NULL) {
- GthTransform transform;
-
- transform = (GthTransform) strtol (value, (char **) NULL, 10);
- if (transform != 1) {
- GthFileData *file_data;
-
- file_data = gth_file_data_new (destination, image_data->file_data->info);
- apply_transformation_async (file_data,
- transform,
- JPEG_MCU_ACTION_TRIM,
- gth_task_get_cancellable (GTH_TASK (self)),
- transformation_ready_cb,
- self);
- appling_tranformation = TRUE;
-
- g_object_unref (file_data);
- }
- }
- }
+ GthFileData *file_data;
+
+ file_data = gth_file_data_new (destination, image_data->file_data->info);
+ apply_transformation_async (file_data,
+ GTH_TRANSFORM_NONE,
+ JPEG_MCU_ACTION_TRIM,
+ gth_task_get_cancellable (GTH_TASK (self)),
+ transformation_ready_cb,
+ self);
+ appling_tranformation = TRUE;
+
+ g_object_unref (file_data);
}
if (! appling_tranformation)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]