X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e854ed477efa1efdb17d2c9ae74d11b2c5e111e9..4b60ad0d8c1ea4f840ad0b9b7c11270322634394:/src/common/imagpng.cpp diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 7370823ed9..54c3ac8819 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -287,7 +287,7 @@ FindMaskColour(unsigned char **lines, png_uint_32 width, png_uint_32 height, } } - if ( !h.FindFirstUnusedColour(&rMask, &gMask, &bMask, rMask, gMask, bMask) ) + if ( !h.FindFirstUnusedColour(&rMask, &gMask, &bMask) ) { wxLogWarning(_("Too many colours in PNG, the image may be slightly blurred.")); @@ -435,14 +435,8 @@ void CopyDataFromPNG(wxImage *image, if ( transparency == Transparency_Mask ) { - if ( IsTransparent( a ) && ( ! ( rMask || gMask || bMask ) ) ) - { - rMask = r; - gMask = g; - bMask = b; - - FindMaskColour(lines, width, height, rMask, gMask, bMask ); - } + FindMaskColour(lines, width, height, + rMask, gMask, bMask); } else // transparency == Transparency_Alpha {