diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2012-06-06 22:55:30 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-06-07 10:21:55 +0200 |
commit | 666f89632fe42afeae02c6022fe0f50198b7118b (patch) | |
tree | fa79fdb072443c4f0980b9eba45950b32ad1c964 /vcl/source/gdi/bitmap3.cxx | |
parent | 41e7b71bdc86c025ba038d1a69f23bbd66d9cb3b (diff) |
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
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 094dcd3c4d8b..ec458d9ac260 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 |