FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   image() compositing bug?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: image() compositing bug?  (Read 414 times)
Quasimondo

WWW Email
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


WWW
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.
 
fry


WWW
Re: image() compositing bug?
« Reply #2 on: Mar 28th, 2004, 8:18pm »

this is the other occurence of the same issue..  
http://processing.org/discourse/yabb/board_Proce55ing_software__bugs_action_display_num_1073329613.html
 
Pages: 1 

« Previous topic | Next topic »