|
Author |
Topic: image() compositing bug? (Read 414 times) |
|
Quasimondo
|
image() compositing bug?
« on: Mar 27th, 2004, 12:04am » |
|
I'm not sure about this one, but somehow it doesn't look right to me: Try this: void loop() { BImage a=new BImage(100,100); image(a,0,0); } If I'm not mistaken the screen should stay gray, as I am creating an empty image. But what happens is that the screen fades to black. This looks to me like the image() routine assumes something like an alpha value of 1 instead of 0 and thus composes an almost-transparent image with the background instead of a completely transparent one.
|
Mario Klingemann | Quasimondo | Incubator | côdeazur
|
|
|
fry
|
Re: image() compositing bug?
« Reply #1 on: Mar 28th, 2004, 8:17pm » |
|
ah, this is a quirky one, actually... right now, an alpha of zero is not *completely* zero, because of another bug (mentioned elsewhere). so what happens is that loop() runs 20-30 times, and the screen fades to black! the new BImage is itself transparent, but since you're not clearing the screen at the beginning of loop() (via background(255) or something like that), the really light shades of your (1% opaque, 99% transparent) image are being drawn multiple times and accumulate. noted along with the other alpha bug. thanks for the report.
|
|
|
|
|