如何使用BufferedImage绘制Image类型的图像?

时间:2015-08-06 15:41:07

标签: java image

我正在使用BufferedImage来绘制Image类型的图像,但它没有被绘制。这是我的代码:

     Image tmp;
     BufferedImage bufferedImage = new BufferedImage(150,150,BufferedImage.TYPE_INT_RGB);
     Graphics g = bufferedImage.getGraphics();
     currState=State.VICTORY;
      while(victoryst<=9)
    {
        tmp=victory[victoryst];
        victoryst++;
        g.drawImage(tmp, 150, 150, null);
     }

0 个答案:

没有答案