[gthumb] restore the correct image size when unding a change
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] restore the correct image size when unding a change
- Date: Sat, 9 Nov 2013 19:59:02 +0000 (UTC)
commit 3cf16698a573a1aa6ae825f5b4c2a3ea52badb78
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 22 10:37:11 2013 +0200
restore the correct image size when unding a change
extensions/image_viewer/gth-image-viewer-page.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index 5761ae8..d43092d 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -1403,8 +1403,10 @@ _gth_image_viewer_page_set_image (GthImageViewerPage *self,
self->priv->image_changed = modified;
g_file_info_set_attribute_boolean (file_data->info, "gth::file::is-modified", modified);
- width = cairo_image_surface_get_width (image);
- height = cairo_image_surface_get_height (image);
+ if (! _cairo_image_surface_get_original_size (image, &width, &height)) {
+ width = cairo_image_surface_get_width (image);
+ height = cairo_image_surface_get_height (image);
+ }
g_file_info_set_attribute_int32 (file_data->info, "image::width", width);
g_file_info_set_attribute_int32 (file_data->info, "image::height", height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]