We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › PImage.blend and display window
Page Index Toggle Pages: 1
PImage.blend and display window (Read 545 times)
PImage.blend and display window
Feb 11th, 2009, 7:12pm
 
Description in reference for PImage.blend said that:
"If the srcImg parameter is not used, the display window is used as the source image."

but

img.blend(x, y, width, height, dx, dy, dwidth, dheight, MODE)

seems to work like

img.blend(img, x, y, width, height, dx, dy, dwidth, dheight, MODE)

Does anyone knows: Is tis a bug or wrong description in reference or I miss something here?

Regards
Dusan Licer
Re: PImage.blend and display window
Reply #1 - Feb 12th, 2009, 11:09am
 
The sentence comes right from the generic blend() page, I think it might need a rewording there...
Re: PImage.blend and display window
Reply #2 - Feb 12th, 2009, 1:01pm
 
Thanks PhiLho,

This probably means, that it is not possible to use PImage as destination and display window as source directly. And that sentence in documentation should be reworded as:

"If the srcImg parameter is not used, the destination image (img) is used as the source image. (to blend with itself)"

Do you think that, this is correct conclusion?

Bye,
Dusan Licer
Re: PImage.blend and display window
Reply #3 - Feb 12th, 2009, 1:29pm
 
You can specify g as source: img.blend(g, ...)
(untested)
Re: PImage.blend and display window
Reply #4 - Feb 12th, 2009, 1:55pm
 
What the ...??

I tested and it works! You are full of tricks.

I was surprised, but then I saw that g is PGraphic variable associated with display window.

PhiLho, thanks for sharing this.
Page Index Toggle Pages: 1