]> git.saurik.com Git - wxWidgets.git/commitdiff
Mention that Alpha Channels are preserved in PNG images.
authorRobin Dunn <robin@alldunn.com>
Fri, 4 Jun 2004 19:07:10 +0000 (19:07 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 4 Jun 2004 19:07:10 +0000 (19:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/docs/MigrationGuide.txt

index c67917c38fa0eda7cdebb1c446429ce1f1c4c441..ec3f9736753eec7f38eb2ba3f6fb56c920afb50c 100644 (file)
@@ -591,6 +591,36 @@ provided by the makers of the ActiveX control that you are using.
 
 
 
+
+PNG Images
+----------
+
+Prior to 2.5 the PNG image handler would convert all alpha channel
+information to a mask when the image was loaded.  Pixels that were
+more than halfway transparent would be made fully transparent by the
+mask and the rest would be made fully opaque.
+
+In 2.5 the image handler has been updated to preserve the alpha
+channel and will now only create a mask when all the pixels in the
+image are either fully transparent or fully opaque.  In addition, the
+wx.DC.DrawBitmap and wx.DC.Blit methods are able to correctly blend
+the pixels in the image with partially transparent alpha values.
+(Currently only on MSW and Mac, if anybody knows how to do it for GTK
+then please submit a patch!)
+
+If you are using a PNG with an alpha channel but you need to have a
+wx.Mask like you automatically got in 2.4 then you can do one of the
+following:
+
+    * Edit the image and make all the partially transparent pixels be
+      fully transparent.
+
+    * Use a different image type.
+
+    * Set a mask based on colour after you load the image.
+
+
+
 OGL is dead! LONG LIVE OGL!
 ---------------------------