Hello
In the game that I am developing, I want to draw a relatively small image in a large rectangle. Naturally, the pixels resize into rectangles that are clearly visible. Quality is not important, since it is an background effect for color. I would like to know how to draw the image so that it is blurred when the pixels become larger. This method is similar the the filters used in modern games. I am using BufferedImage objects that are drawn on Graphics objects.
Edit: Solution found
public void draw(Graphics canvas, Rectangle region){
Graphics2D canvas2D = (Graphics2D) canvas;
canvas2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
canvas2D.drawImage(image, (int)region.getX(), (int)region.getY(), (int)region.getWidth(), (int)region.getHeight(), null);
}
Thanks anyway.