blending 2 images

J

JavaJug

Hello there !
I've never done complex image manipulation in Java and would need to create a
new image that is a mix between 2 other images, in which the value of each pixel
would be for instance 0.3 times the value of the same pixel in the 1st image and
0.7 times the value of the pixel in the 2nd one.
Should I use an alpha channel to do it ?
Is there a quick way to do it ? it's to add an effect in an applet (
http://www.chez.com/fuzzyghost/java/roserain/Rose.html I'd like to add a trail
on the falling flowers)

THX !
 
B

Boudewijn Dijkstra

JavaJug said:
Hello there !
I've never done complex image manipulation in Java and would need to create a
new image that is a mix between 2 other images, in which the value of each
pixel would be for instance 0.3 times the value of the same pixel in the 1st
image and 0.7 times the value of the pixel in the 2nd one.
Should I use an alpha channel to do it ?
Is there a quick way to do it ? it's to add an effect in an applet (
http://www.chez.com/fuzzyghost/java/roserain/Rose.html I'd like to add a
trail on the falling flowers)

implement java.awt.image.RGBImageFilter
 
T

Thomas Weidenfeller

JavaJug said:
Hello there !
I've never done complex image manipulation in Java and would need to
create a new image that is a mix between 2 other images, in which the
value of each pixel would be for instance 0.3 times the value of the
same pixel in the 1st image and 0.7 times the value of the pixel in the
2nd one.

Check out AlphaComposite.

/Thomas

BTW: There is a separate newsgroup for GUI questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top