Kaydet (Commit) 5e5b90c1 authored tarafından Caolán McNamara's avatar Caolán McNamara

in BITFIELDS mode (3) there are *3* pal entries not 12

There are 12 *bytes*, which presumably is the thinko there. But this nPalCount
gets multiplied by 4 to convert it to bytes later.

This is the source of the bad mask values found after "Use the cairo-compatible
basebmp surface for headless" etc. Arbitrary values ended up being read as mask
values.

Change-Id: If5d93f74b1c58d3ecdb5186f93cb0215a556586a
üst 164276a0
...@@ -857,7 +857,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, ...@@ -857,7 +857,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
aMemStm.ReadUInt32( nColsUsed ); aMemStm.ReadUInt32( nColsUsed );
nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) : nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 ); ( ( 3 == nCompression ) ? 3 : 0 );
m_rStm.Write( aMemStm.GetData(), nDIBSize ); m_rStm.Write( aMemStm.GetData(), nDIBSize );
......
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