[Image-SIG] I'm confused by alpha blending.
Ned Batchelder
ned at nedbatchelder.com
Fri Mar 24 20:12:42 CET 2006
(I send this days ago, and was told it was subject to moderation because
of a suspicious header).
I found the problem, thanks to the code you posted. My destination
image was "RGBA", and I was viewing it in a web browser. Most of the
image had an opaque alpha channel, but where I had drawn the drop
shadows, it had the shadow's alpha values, so the white of the browser
was showing through. This isn't the most intuitive way for alpha
drawing to work. I guess I could see it both ways: if the destination
is opaque, it should stay opaque, or drawing pixels onto a destination
takes all the values from the source.
In any case, changing my destination image from RGBA to RGB solved the
problem.
Thanks.
--Ned.
Fredrik Lundh wrote:
>>> Is there something I am doing wrong?
>>>
>> sounds confusing, indeed.
>>
>> are you 100% sure
>>
>> what happens
>>
>> what happens
>>
>
> did you get anywhere with this ?
>
>
>
> _______________________________________________
> Image-SIG maillist - Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>
>
>
--
Ned Batchelder, http://nedbatchelder.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/image-sig/attachments/20060324/cb56a442/attachment.htm
More information about the Image-SIG
mailing list