Sign in to follow this  
leif_dragon

[java] Image Filtering Efficiency

Recommended Posts

I was wondering what is the most efficient/fastest way of applying a 'fading' effect on a BufferedImage or Image. I implemented my own method to fade a bufferedImage by using two loops to cycle through each pixel, changing its Alpha value to a lower value. This method worked great, but for a bufferedImage with a large area it proved to be very very slow. I then implemented RescaleOp and used it instead to fade my bufferedImage, it worked slightly faster but still ran at a snails pace when used on a large bufferedImage.. The image I am fading is a particle generated image, I draw a number of particles (Ovals) to the bufferedImage, then fade the bufferedImage, then re-draw the particles in a new position, etc. Thus giving the effect of the particles having trails. I can think of a few different ways around this problem, but my initial question still stands. What is the most efficient way of creating a fading effect on a bufferedImage or Image. Any help is appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this