From f773e9b0bbfd051a4ae316461fd241230c87e39f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 11 Dec 2004 21:52:36 +0000 Subject: [PATCH] Backed-out PNG8 patch (no time to look at why it breaks other PNGs). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imagpng.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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 { -- 2.45.2