I need to set filter to the image..
I make this :
int type = BufferedImage.TYPE_INT_RGB;
double panelHeight = frame.getHeight();
double panelWidth = frame.getWidth();
BufferedImage image = null;
try {
image = ImageIO.read(new File(frame.getURL()));
} catch (IOException e1) {
e1.printStackTrace();
}
int height = image.getHeight();
int width = image.getWidth();
for(int h=1; h < height-1; h++) {
for(int w=1; w < width-1;w++) {
float color = ((1f/9f*image.getRGB(w-1, h-1))+(1f/9f* image.getRGB(w, h-1))+(1f/9f* image.getRGB(w+1, h-1))+
(1f/9f* image.getRGB(w-1, h))+(1f/9f* image.getRGB(w, h))+(1f/9f* image.getRGB(w+1, h))+
(1f/9f* image.getRGB(w-1, h+1))-(1f/9f* image.getRGB(w, h+1))-(1f/9f* image.getRGB(w+1, h+1)));
image.setRGB(w, h,(int)color);
}
}
//save im into a file
frame.setFilteredImage(Resizer.resize(image, panelHeight, panelWidth));
frame has url of my image. I get it using frame.getURL()
And in result I want to see my image with blur filter but instead it gives me

So may be someone know where I make a mistake???
Or may be you know another good way to set filter using such matrix
use blurFilter
ref: http://www.java2s.com/Code/Java/2D-Graphics-GUI/ImageFilter.htm