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?= <gokcen.eraslan@gmail.com>
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
Context
- fdo#48932: Prefer interpolation-based image rescaling in PDF export · Gökçen Eraslan
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.