[How it's done?] - GaussianBlurFilter filter
Recently I've been participating in a project in my work, and am trying to manipulate filters on images. I'm trying to produce an image following this logical order:
1 - I produce an image that will be painted a geometric shape (Shape object).
2 - I produce another image by applying the previous image with the filter GraussianBlurFilter.
The result I have is that the gaussian blur is applied only on pixels that are "misaligned" pixels diagonally, not vertically or horizontally.
Here's the code (it's a method):
private BufferedImage getImage()
// Build image with the desired shape.
BufferedImage temp = new BufferedImage(
Graphics2D gTemp = temp.createGraphics();
// Build another image with the previous blurred image.
int radius = 8;
BufferedImage ret = new BufferedImage(
this.width + radius * 2 ,
this.height + radius * 2 ,
GaussianBlurFilter gaussianFilter = new GaussianBlurFilter(radius);
Graphics2D gRet = ret.createGraphics();
// Paints a white background to show the missing actions (?) from the filter.
gRet.fillRect(0 , 0 , ret.getWidth() , ret.getHeight());
gRet.drawImage(temp , gaussianFilter , radius , radius);
And here's a screen shot:
If the image does not appear: http://www.freeimagehosting.net/7av86
Can somebody tell me what I'm doing wrong?