import java.io.*;
import javax.imageio.ImageIO;
import java.awt.Color;
class game1006 {
public static void main(String[] args) {
int width = 20;
int height = 20;
BufferedImage bimg = [[new]] BufferedImage(width,
height, BufferedImage.TYPE_INT_BGR);
// 描画.
Graphics gg = bimg.getGraphics();
gg.setColor(Color.YELLOW);
gg.fillRect(0, 0, width, height);
gg.dispose();
// JPEG 形式で保存.
try {
ImageIO.[[write]](bimg, "jpeg", new File("outfile.jpg"));
} catch (IOException exception) {
exception.printStackTrace();
}
}
}
最終更新:2011年03月06日 01:01