Image luminosity
in
Programming Questions
•
1 year ago
I'll keep this short. Let's say I'm trying to print two images on top of each other:
- PImage peach = loadimage("peach.png");
- PImage grey = loadimage("grey.png");
- void draw()
- {
- image(peach, 0, 0, 256, 256);
- //Next image to print on top of previous one
- image(grey, 0, 0, 256, 256);
- }
The images:
peach.png:
grey.png:
With my current code, all you would see is the grey box (since the peach gets overlapped). However, in photoshop, if you put the grey layer on top of the peach layer and turn the blend mode of the grey layer to 'luminosity', you get this result:
My question is, how can I produce that^^ same result in processing? Please breakdown your explanation.
Thank you very much
1