[gthumb] cairo scale: copy the metadata from the original image
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] cairo scale: copy the metadata from the original image
- Date: Sat, 9 Nov 2013 20:00:07 +0000 (UTC)
commit 11a55d01fb95a1bb39e69baaf3538169e0612725
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Oct 6 14:23:27 2013 +0200
cairo scale: copy the metadata from the original image
gthumb/cairo-scale.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/cairo-scale.c b/gthumb/cairo-scale.c
index 14dbd38..28c482d 100644
--- a/gthumb/cairo-scale.c
+++ b/gthumb/cairo-scale.c
@@ -522,9 +522,12 @@ _cairo_image_surface_scale (cairo_surface_t *image,
scaled = _cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
scaled_width,
scaled_height);
+ _cairo_image_surface_copy_metadata (image, scaled);
metadata = _cairo_image_surface_get_metadata (scaled);
- metadata->original_width = src_width;
- metadata->original_height = src_height;
+ if (metadata->original_width <= 0) {
+ metadata->original_width = src_width;
+ metadata->original_height = src_height;
+ }
if (scaled == NULL)
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]