qq_遁去的一_1
Image image= Tookit.getDefaultToolkit().createImage("路径"); //创建了图 后面想做什么? image = image.getScaledInstance(30, 30, Image.SCALE_SMOOTH); BufferedImage bufimg = new BufferedImage(30,30,BufferedImage.TYPE_INT_RGB); Graphics g = bufimg.getGraphics(); g.drawImage(image, 0, 0, null); g.dispose(); ImageIO.write(bufimg, "JPEG", response.getOutputStream()); 用流的方式写到网页上