]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/image/image.cpp
Fixes to allow compilation with no wchar_t (djgpp probably has a real wchar_t
[wxWidgets.git] / samples / image / image.cpp
index c1e36cc753a2d6175851971a5eb9aecde1c56394..7bfe2db778bfb71e12cd5ee0f075341acd8aba2e 100644 (file)
@@ -321,9 +321,9 @@ public:
             {
                 // note that RGB must be premultiplied by alpha
                 unsigned a = (Data::Iterator::ChannelType)((x*255.)/REAL_SIZE);
-                p.Red() = r * alpha / 256;
-                p.Green() = g * alpha / 256;
-                p.Blue() = b * alpha / 256;
+                p.Red() = r * a / 256;
+                p.Green() = g * a / 256;
+                p.Blue() = b * a / 256;
                 p.Alpha() = a;
 
                 ++p; // same as p.OffsetX(1)