import Image, ImageDraw, ImageFont
W = 320
H = 480
pageNum = 200
for i in xrange(pageNum):
print(i)
s = str(i)
filename = s.rjust(4, '0')
filename = filename + '.jpg'
skyblue = (200,200,255)
darkblue = 'rgb(100,100,200)'
black = 'rgb(50,50,50)'
img = Image.new('RGB', (320,480), skyblue)
font = ImageFont.truetype('C:\WINDOWS\Fonts\MSMINCHO.TTC', 48, encoding="utf-8")
draw = ImageDraw.Draw(img)
draw.text((50,50), filename, font=font, fill=black)
draw.rectangle(((10,10),(W-10,H-10)), outline=darkblue)
img.save(filename)