Jump to content
  • Advertisement


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


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

This topic is 5884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!