mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249550 (part 1) - Flip BMPs with negative height when downscaling. r=tn.
This commit is contained in:
parent
18cead6ef6
commit
0494c4820e
@ -682,10 +682,11 @@ nsBMPDecoder::ReadBitfields(const char* aData, size_t aLength)
|
|||||||
|
|
||||||
if (mDownscaler) {
|
if (mDownscaler) {
|
||||||
// BMPs store their rows in reverse order, so the downscaler needs to
|
// BMPs store their rows in reverse order, so the downscaler needs to
|
||||||
// reverse them again when writing its output.
|
// reverse them again when writing its output. Unless the height is
|
||||||
|
// negative!
|
||||||
rv = mDownscaler->BeginFrame(GetSize(), Nothing(),
|
rv = mDownscaler->BeginFrame(GetSize(), Nothing(),
|
||||||
mImageData, mMayHaveTransparency,
|
mImageData, mMayHaveTransparency,
|
||||||
/* aFlipVertically = */ true);
|
/* aFlipVertically = */ mH.mHeight >= 0);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
return Transition::TerminateFailure();
|
return Transition::TerminateFailure();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user