[gthumb] fixed error when rotating keeping the origina size
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed error when rotating keeping the origina size
- Date: Sat, 7 Jul 2012 12:59:10 +0000 (UTC)
commit 576a0f48fb18075cb721a795ff07b9ca6c9a8c7e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Jul 4 17:11:08 2012 +0200
fixed error when rotating keeping the origina size
extensions/file_tools/gth-image-rotator.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index 943a28c..ebb6f9b 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -921,8 +921,8 @@ gth_image_rotator_get_result_high_quality (GthImageRotator *self)
break;
case GTH_TRANSFORM_RESIZE_CLIP:
- self->priv->crop_region.x = (cairo_image_surface_get_width (rotated) - self->priv->original_width) / 2;
- self->priv->crop_region.y = (cairo_image_surface_get_height (rotated) - self->priv->original_height) / 2;
+ self->priv->crop_region.x = MAX (((double) cairo_image_surface_get_width (rotated) - self->priv->original_width) / 2.0, 0);
+ self->priv->crop_region.y = MAX (((double) cairo_image_surface_get_height (rotated) - self->priv->original_height) / 2.0, 0);
self->priv->crop_region.width = self->priv->original_width;
self->priv->crop_region.height = self->priv->original_height;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]