X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b068dfe2926a71c0666587d534e9fee76abc90e1..61c213fe224da24ce33c9187263e75a17ca83a04:/samples/image/image.cpp diff --git a/samples/image/image.cpp b/samples/image/image.cpp index c1e36cc753..7bfe2db778 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -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)