package anime;
import java.awt.*;
import java.awt.Color;
import java.awt.image.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import java.awt.Polygon;
public class pro {
public static void main(String[] args) {
pro test=new pro();
}
pro(){
int w1,h1,mx,nx;
int xxs,yys;
int s;
for(s=1;s<11;s++){
w1=640;
h1=480;
BufferedImage off = new BufferedImage(w1, h1, BufferedImage.TYPE_INT_BGR);
Graphics offsc = off.getGraphics();
offsc.setColor(Color.BLUE);
if(Math.random()>0.5)offsc.setColor(Color.RED);
offsc.fillRect(0,0,640,480);
offsc.dispose();
try {
ImageIO.write(off, "jpeg", new File("data/"+s+".jpg"));
} catch (IOException exception) { exception.printStackTrace(); }
}
}
}
最終更新:2015年12月06日 12:06