pillow-pie.py
# coding=UTF-8
from PIL import Image
from PIL import ImageDraw
# 扇形を描画する
img1 = Image.new("RGB", (100,100), "#ffffff")
draw = ImageDraw.Draw(img1)
draw.pieslice((10,10)+(89,89), 90, 180, outline="#000000", fill="#bbddff")
del draw
img1.save("/tmp/pillow-pie.png")
出力画像(pillow-pie.png)
No comments:
Post a Comment