[gthumb] use the fast scale function when quality is not important



commit 412ecf8cc22b347b7db957952563ce19377577d0
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Aug 22 09:20:13 2012 +0200

    use the fast scale function when quality is not important

 extensions/file_tools/gth-image-line-tool.c |    2 +-
 extensions/file_tools/gth-image-rotator.c   |    2 +-
 gthumb/gth-image-navigator.c                |    8 +++-----
 3 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-line-tool.c b/extensions/file_tools/gth-image-line-tool.c
index 09f532f..115c999 100644
--- a/extensions/file_tools/gth-image-line-tool.c
+++ b/extensions/file_tools/gth-image-line-tool.c
@@ -147,7 +147,7 @@ update_image_surface (GthImageLineTool *self)
 	gtk_widget_get_allocation (GTK_WIDGET (self->priv->viewer), &allocation);
 	max_size = MAX (allocation.width, allocation.height) / G_SQRT2 + 2;
 	if (scale_keeping_ratio (&width, &height, max_size, max_size, FALSE))
-		preview_image = _cairo_image_surface_scale (image, width, height, SCALE_FILTER_BEST, NULL);
+		preview_image = _cairo_image_surface_scale_bilinear (image, width, height);
 	else
 		preview_image = cairo_surface_reference (image);
 
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index e4d7f12..70b9e50 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -239,7 +239,7 @@ update_image_surface (GthImageRotator *self)
 	gtk_widget_get_allocation (GTK_WIDGET (self->priv->viewer), &allocation);
 	max_size = MAX (allocation.width, allocation.height) / G_SQRT2 + 2;
 	if (scale_keeping_ratio (&width, &height, max_size, max_size, FALSE))
-		preview_image = _cairo_image_surface_scale (image, width, height, SCALE_FILTER_BEST, NULL);
+		preview_image = _cairo_image_surface_scale_bilinear (image, width, height);
 	else
 		preview_image = cairo_surface_reference (image);
 
diff --git a/gthumb/gth-image-navigator.c b/gthumb/gth-image-navigator.c
index 01fedab..6a8dac1 100644
--- a/gthumb/gth-image-navigator.c
+++ b/gthumb/gth-image-navigator.c
@@ -393,11 +393,9 @@ update_popup_geometry (NavigatorPopup *nav_popup)
 	nav_popup->popup_height = MAX ((int) floor (nav_popup->zoom_factor * zoomed_height + 0.5), 1);
 
 	cairo_surface_destroy (nav_popup->image);
-	nav_popup->image = _cairo_image_surface_scale (gth_image_viewer_get_current_image (nav_popup->viewer),
-						       nav_popup->popup_width,
-						       nav_popup->popup_height,
-						       SCALE_FILTER_GOOD,
-						       NULL);
+	nav_popup->image = _cairo_image_surface_scale_bilinear (gth_image_viewer_get_current_image (nav_popup->viewer),
+								nav_popup->popup_width,
+								nav_popup->popup_height);
 
 	/* visible area size */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]