I wrote this little resize method to scale .png pictures:
public BufferedImage resize(BufferedImage img, int newW, int newH) {
int w = img.getWidth();
int h = img.getHeight();
BufferedImage dimg = new BufferedImage(newW, newH, img.getType());
Graphics2D g = dimg.createGraphics();
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g.drawImage(img, 0, 0, newH, newW, 0, 0, w, h, null);
g.dispose();
return dimg;
}
I want to make my .png picture at least 8 times bigger, but this fcks up the resolution of the image. Does anyone know how to solve this?
Thanks.