X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd61e8ed01072bc75060245923419eda94ca5d32..c6a6bbbf637a5a580b7ab182483d27522f5e3189:/src/common/imagpng.cpp diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index da38225970..009f133de9 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -279,6 +279,7 @@ FindMaskColour(unsigned char **lines, png_uint_32 width, png_uint_32 height, r2 = *p++; g2 = *p++; b2 = *p++; + ++p; // jump over alpha wxImageHistogramEntry& entry = h[wxImageHistogram:: MakeKey(r2, g2, b2)]; @@ -384,8 +385,8 @@ void CopyDataFromPNG(wxImage *image, if ( IsTransparent(a) ) { *ptrDst++ = rMask; - *ptrDst++ = bMask; *ptrDst++ = gMask; + *ptrDst++ = bMask; break; } // else: !transparent @@ -452,8 +453,8 @@ void CopyDataFromPNG(wxImage *image, if ( IsTransparent(a) ) { *ptrDst++ = rMask; - *ptrDst++ = bMask; *ptrDst++ = gMask; + *ptrDst++ = bMask; break; } else // !transparent