[Libreoffice-commits] .: vcl/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Jun 7 01:25:08 PDT 2012


 vcl/source/gdi/bitmap3.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 666f89632fe42afeae02c6022fe0f50198b7118b
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Wed Jun 6 22:55:30 2012 +0200

    Fix new Bitmap creation in Lanczos resampling.
    
    Bitmaps in Lanczos resampling were not created correctly. This
    problem was visible in Impress when the background of a slide was
    set to "tile".
    
    Change-Id: Ic77ae1f20a872176eacb1f28175d53b4a0934008

diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 094dcd3..ec458d9 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -2208,7 +2208,6 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
     return bRet;
 }
 
-//-----------------------------------------------------------------------------------
 bool Bitmap::ImplScaleLanczos( const double& rScaleX, const double& rScaleY )
 {
     const Size  aSizePix( GetSizePixel() );
@@ -2232,7 +2231,7 @@ bool Bitmap::ImplScaleLanczos( const double& rScaleX, const double& rScaleY )
     ImplCalculateContributions( nWidth, nNewWidth, aSupport, aNumberOfContributions, pWeights, pPixels, pCount );
 
     BitmapReadAccess* pReadAcc = AcquireReadAccess();
-    Bitmap aNewBitmap( Size( nNewWidth, nHeight ), GetBitCount(), &pReadAcc->GetPalette() );
+    Bitmap aNewBitmap( Size( nNewWidth, nHeight ), 24);
     bool bResult = ImplHorizontalConvolution( aNewBitmap, pReadAcc, aNumberOfContributions, pWeights, pPixels, pCount );
 
     // Cleanup
@@ -2260,7 +2259,7 @@ bool Bitmap::ImplScaleLanczos( const double& rScaleX, const double& rScaleY )
     ImplCalculateContributions(nHeight, nNewHeight, aSupport, aNumberOfContributions, pWeights, pPixels, pCount );
 
     pReadAcc = AcquireReadAccess();
-    aNewBitmap = Bitmap( Size( nNewWidth, nNewHeight ), GetBitCount(), &pReadAcc->GetPalette() );
+    aNewBitmap = Bitmap( Size( nNewWidth, nNewHeight ), 24);
     bResult = ImplVerticalConvolution( aNewBitmap, pReadAcc, aNumberOfContributions, pWeights, pPixels, pCount );
 
     // Cleanup


More information about the Libreoffice-commits mailing list