This topic is now archived and is closed to further replies.


[java] How to perform a blur effect on a pic ?

Recommended Posts

A blur is created by averaging pixels. A basic blur would look something like this:

Make a copy of the image (buffer)
For each pixel find the total red, green and blue values of itself and the surrounding eight pixels in the buffer (don''t read the values from the image itself, since they will change as you apply the blur). Divide those three values by 9 to get new red, green and blue values and set the pixel to that color.
When done you can dispose of the buffer.

Share this post

Link to post
Share on other sites