summaryrefslogtreecommitdiff
path: root/vcl/headless/svpbmp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/headless/svpbmp.cxx')
-rw-r--r--vcl/headless/svpbmp.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index bc2b2b90d8b8..cedb9751a025 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -52,8 +52,9 @@ bool SvpSalBitmap::Create( const Size& rSize,
aSize.setX( 1 );
if( aSize.getY() == 0 )
aSize.setY( 1 );
+ sal_Int32 nStride = getBitmapDeviceStrideForWidth(nFormat, aSize.getX());
if( nBitCount > 8 )
- m_aBitmap = createBitmapDevice( aSize, false, nFormat );
+ m_aBitmap = createBitmapDevice( aSize, false, nFormat, nStride );
else
{
// prepare palette
@@ -66,7 +67,7 @@ bool SvpSalBitmap::Create( const Size& rSize,
const BitmapColor& rCol = rPalette[i];
(*pPalette)[i] = basebmp::Color( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() );
}
- m_aBitmap = createBitmapDevice( aSize, false, nFormat,
+ m_aBitmap = createBitmapDevice( aSize, false, nFormat, nStride,
basebmp::RawMemorySharedArray(),
basebmp::PaletteMemorySharedVector( pPalette )
);
@@ -326,6 +327,7 @@ void SvpSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
m_aBitmap = basebmp::createBitmapDevice( m_aBitmap->getSize(),
m_aBitmap->isTopDown(),
m_aBitmap->getScanlineFormat(),
+ m_aBitmap->getScanlineStride(),
m_aBitmap->getBuffer(),
pPal );
}