public static BufferedImage resizeImage(Image image){
  BufferedImage result=new BufferedImage(128,128,BufferedImage.TYPE_INT_ARGB);
  Graphics2D graphics=result.createGraphics();
  graphics.drawImage(image,0,0,128,128,null);
  graphics.dispose();
  return result;
}

public static BufferedImage resizeImage ( Image image ) { BufferedImage result = new BufferedImage ( 128 , 128 , BufferedImage . TYPE_INT_ARGB ) ; Graphics2D graphics = result . createGraphics ( ) ; graphics . drawImage ( image , 0 , 0 , 128 , 128 , null ) ; graphics . dispose ( ) ; return result ; }
resize an image to 128x128 .
