Kaydet (Commit) ffe150ce authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Michael Meeks

tdf#94739 use GetScanlineSize instead of calculating it

We calculate the scanline size wrongly when writing a PDF so the
image is not exported correctly. BitmapAccess already has a method
to determine the scanline size so use that instead.

Change-Id: Icccba8f26c5e0fd4bd4c37bba7c5a7fe8d0094bd
(cherry picked from commit 82e0c38e)
Signed-off-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/20595Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 351ac416
......@@ -11426,7 +11426,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
beginCompression();
if( ! bTrueColor || pAccess->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB )
{
const int nScanLineBytes = 1 + ( pAccess->GetBitCount() * ( pAccess->Width() - 1 ) / 8U );
const int nScanLineBytes = pAccess->GetScanlineSize();
for( int i = 0; i < pAccess->Height(); i++ )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment