Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # polygon_opacity.py
- from PIL import Image, ImageDraw
- img = Image.new('RGB', (100, 100))
- drw = ImageDraw.Draw(img, 'RGBA')
- drw.polygon([(50,100), (100, 0), (0, 0)], (255, 255, 0, 80))
- drw.polygon([(50, 0), (100, 100), (0, 100)], (0, 0, 255, 80))
- img.save('c:\pydemo\out.png', 'PNG')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement