Hello,

Attached patch changes preferred image resampling method used in PDF
export to BMP_SCALE_INTERPOLATE. That minimizes Moire artifacts in the
images. I want to thank Kendy for his support.

Here is a screenshot: http://imagebin.org/213821

Left one is the default BMP_SCALE_FAST and right one is
BMP_SCALE_INTERPOLATE.

-- 
Gökçen Eraslan
>From d841ade3d3f0a0e163d7a6d0015c0048f58df27d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=B6k=C3=A7en=20Eraslan?= <[email protected]>
Date: Fri, 25 May 2012 17:05:57 +0300
Subject: [PATCH] fdo#46378: Prefer interpolation-based image rescaling in PDF
 export.

Change-Id: I9ead1221b4562dea0e1ef289944ac11ea850ed1a
---
 vcl/source/gdi/pdfwriter_impl2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 4ba5e2c..b86e758 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -137,7 +137,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
                     aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH);
                 }
                 if( aNewBmpSize.Width() && aNewBmpSize.Height() )
-                    aBitmapEx.Scale( aNewBmpSize );
+                    aBitmapEx.Scale( aNewBmpSize, BMP_SCALE_INTERPOLATE );
                 else
                     aBitmapEx.SetEmpty();
             }
-- 
1.7.10.1

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to