]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagpng.cpp
fixed typo (no code changes)
[wxWidgets.git] / src / common / imagpng.cpp
index 250fac506acf6d28c269c35c0d0d6689b403ef6b..48d7aa52f59b815b4acb210b4883ec544e2de8b8 100644 (file)
@@ -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()))