mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 04:27:41 +00:00
Bug 1063084 - BMP with compression can be transparent. r=seth
This commit is contained in:
parent
3f1edc2c3a
commit
26e2c0e96e
@ -742,6 +742,9 @@ nsBMPDecoder::WriteInternal(const char* aBuffer, uint32_t aCount, DecodeStrategy
|
||||
byte = *aBuffer++;
|
||||
aCount--;
|
||||
mCurPos += byte;
|
||||
// Delta encoding makes it possible to skip pixels making
|
||||
// the image transparent.
|
||||
mUseAlphaData = mHaveAlphaData = true;
|
||||
if (mCurPos > mBIH.width)
|
||||
mCurPos = mBIH.width;
|
||||
|
||||
@ -753,6 +756,9 @@ nsBMPDecoder::WriteInternal(const char* aBuffer, uint32_t aCount, DecodeStrategy
|
||||
byte = *aBuffer++;
|
||||
aCount--;
|
||||
mState = eRLEStateInitial;
|
||||
// Delta encoding makes it possible to skip pixels making
|
||||
// the image transparent.
|
||||
mUseAlphaData = mHaveAlphaData = true;
|
||||
mCurLine -= std::min<int32_t>(byte, mCurLine);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user