From b65991145a07287f93b9738f4b9ab3ceca36402d Mon Sep 17 00:00:00 2001 From: Tsutomu Uchino Date: Wed, 22 Jan 2014 06:16:21 +0000 Subject: Resolves: #i106063# avoid additional seek for true color DIB The position in the stream is already at the end of color palette. (cherry picked from commit 352ca2f6ecf8910afa24c53d7e872f62b2321321) Change-Id: I1696c1b6780407ab579b6215ab13a327ae09fc32 --- vcl/source/gdi/dibtools.cxx | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 79bc942e6445..389f17ec198d 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -414,12 +414,6 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r // Read data if(bNative) { - // true color DIB's can have a (optimization) palette - if(rHeader.nColsUsed && 8 < rHeader.nBitCount) - { - rIStm.SeekRel(rHeader.nColsUsed * ((rHeader.nSize != DIBCOREHEADERSIZE ) ? 4 : 3)); - } - rIStm.Read(rAcc.GetBuffer(), rHeader.nHeight * nAlignedWidth); } else @@ -455,12 +449,6 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r const long nHeight(rHeader.nHeight); sal_uInt8* pBuf = new sal_uInt8[nAlignedWidth]; - // true color DIB's can have a (optimization) palette - if(rHeader.nColsUsed && 8 < rHeader.nBitCount) - { - rIStm.SeekRel(rHeader.nColsUsed * ((rHeader.nSize != DIBCOREHEADERSIZE ) ? 4 : 3)); - } - const long nI(bTopDown ? 1 : -1); long nY(bTopDown ? 0 : nHeight - 1); long nCount(nHeight); -- cgit