X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9b964cfe591532f21c31204032357899cc2cbad..095b80e2b5120d4c476a834b2017c355fa9afef0:/src/common/imagpng.cpp diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 250fac506a..48d7aa52f5 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -700,7 +700,11 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos data[(x << 2) + 0] = *ptr++; data[(x << 2) + 1] = *ptr++; data[(x << 2) + 2] = *ptr++; - if (( !image->HasMask() ) || \ + if ( image->HasAlpha() ) + { + data[(x << 2) + 3] = image->GetAlpha(x, y); + } + else if (( !image->HasMask() ) || \ (data[(x << 2) + 0] != image->GetMaskRed()) || \ (data[(x << 2) + 1] != image->GetMaskGreen()) || \ (data[(x << 2) + 2] != image->GetMaskBlue()))