[poppler] poppler/CairoOutputDev.cc

Adrian Johnson ajohnson at kemper.freedesktop.org
Wed Aug 16 11:52:20 UTC 2017


 poppler/CairoOutputDev.cc |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 00a536a455e4dd396c6b8b74d3e6a5c82d987eed
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Wed Aug 16 21:21:58 2017 +0930

    cairo 1.14 now has high quality downscaling
    
    The filter needs to be GOOD or BEST to activate the high quality
    downscaling.

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 9a2e0535..c4557e44 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -143,7 +143,11 @@ CairoOutputDev::CairoOutputDev() {
   strokePathClip = NULL;
   cairo = NULL;
   currentFont = NULL;
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
+  prescaleImages = gFalse;
+#else
   prescaleImages = gTrue;
+#endif
   printing = gTrue;
   use_show_text_glyphs = gFalse;
   inUncoloredPattern = gFalse;
@@ -1961,7 +1965,7 @@ CairoOutputDev::getFilterForSurface(cairo_surface_t *image,
 				    GBool interpolate)
 {
   if (interpolate)
-    return CAIRO_FILTER_BILINEAR;
+    return CAIRO_FILTER_BEST;
 
   int orig_width = cairo_image_surface_get_width (image);
   int orig_height = cairo_image_surface_get_height (image);
@@ -1981,7 +1985,7 @@ CairoOutputDev::getFilterForSurface(cairo_surface_t *image,
   if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4)
 	  return CAIRO_FILTER_NEAREST;
 
-  return CAIRO_FILTER_BILINEAR;
+  return CAIRO_FILTER_BEST;
 }
 
 void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,


More information about the poppler mailing list