diff options
author | Russell Haley <[email protected]> | 2016-02-13 18:59:17 -0600 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-07-11 08:48:55 +0200 |
commit | bbf490bacf488f1e332ed0f5d5568af489aaa3c8 (patch) | |
tree | 8c99df8de779e2e7291d175dfcbe00824acb6355 | |
parent | 433c776b757c5cc909d6e614ebf39dbff9379320 (diff) | |
download | eom-bbf490bacf488f1e332ed0f5d5568af489aaa3c8.tar.bz2 eom-bbf490bacf488f1e332ed0f5d5568af489aaa3c8.tar.xz |
EomScrollView: Use better downscaling filter
Replace all instances of CAIRO_FILTER_BILINEAR with CAIRO_FILTER_GOOD.
This produces much less aliasing on downscaled images. CAIRO_FILTER_GOOD
uses the same method as CAIRO_FILTER_BILINEAR for scale factors greater
than 0.75, according to https://bugs.webkit.org/show_bug.cgi?id=147826.
Comparison screenshots made with eog 3.18.1: http://imgur.com/a/NaoOs
CAIRO_FILTER_BEST is better still, but the the visual difference is
almost imperceptible and the performance impact is severe.
https://bugzilla.gnome.org/show_bug.cgi?id=665897
origin commit: https://gitlab.gnome.org/GNOME/eog/commit/fbc1128
fixes https://github.com/mate-desktop/eom/issues/96
-rw-r--r-- | src/eom-scroll-view.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index 5f424b6..491796c 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -1410,7 +1410,7 @@ eom_scroll_view_set_antialiasing_in (EomScrollView *view, gboolean state) priv = view->priv; - new_interp_type = state ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_NEAREST; + new_interp_type = state ? CAIRO_FILTER_GOOD : CAIRO_FILTER_NEAREST; if (priv->interp_type_in != new_interp_type) { priv->interp_type_in = new_interp_type; @@ -1429,7 +1429,7 @@ eom_scroll_view_set_antialiasing_out (EomScrollView *view, gboolean state) priv = view->priv; - new_interp_type = state ? CAIRO_FILTER_BILINEAR : CAIRO_FILTER_NEAREST; + new_interp_type = state ? CAIRO_FILTER_GOOD : CAIRO_FILTER_NEAREST; if (priv->interp_type_out != new_interp_type) { priv->interp_type_out = new_interp_type; @@ -1737,8 +1737,8 @@ eom_scroll_view_init (EomScrollView *view) priv->min_zoom = MIN_ZOOM_FACTOR; priv->zoom_mode = ZOOM_MODE_FIT; priv->upscale = FALSE; - priv->interp_type_in = CAIRO_FILTER_BILINEAR; - priv->interp_type_out = CAIRO_FILTER_BILINEAR; + priv->interp_type_in = CAIRO_FILTER_GOOD; + priv->interp_type_out = CAIRO_FILTER_GOOD; priv->scroll_wheel_zoom = FALSE; priv->zoom_multiplier = IMAGE_VIEW_ZOOM_MULTIPLIER; priv->image = NULL; |