How can be obtained the effects as in this applet >>>> ?
I've tried with AC composite without results ......
Thanks a lot.
When you have access to the image's pixel data (which you can through a BufferedImage) you could alter the pixel values like this to fade between two:
for(int i=0; i
for(int j=0; j
int sc = sourceBuffer[i + j * width];
int dc = destBuffer[i + j * width];
destBuffer[i + j * width] = blendColor(sc, dc, fadeAmount);
public int blendColor(int c1, int c2)
return ((c1 & 0x00fefeff) >> 1) + ((c2 & 0x00fefeff) >> 1);
Also, I started a project that might help:
This has over 50 transitions if you're interested in more than fading. :)
> How can be obtained the effects as in this applet >>>> ?
> I've tried with AC composite without results ......
> Thanks a lot.
Have a look at https://timingframework.dev.java.net You can find what you are looking for in the examples.
Or you can have a look at examples from Filthy Rich Client book at http://filthyrichclients.org/
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.