/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ int width = scale * bi.getWidth(); int height = scale * bi.getHeight(); // Cicla dando un valore medio al pixel corrispondente for(int i=0; i<width; i++) for(int j=0; j<height; j++) biScale.setRGB(i, j, bi.getRGB(i/scale, j/scale)); return biScale; }