Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image, ImageDraw
- help(ImageDraw)
- name = 'ILYA'
- image = Image.new('RGB', (220, 75), (0, 0, 0))
- draw = ImageDraw.Draw(image)
- draw.arc((0, 0, 50, 20), start=315, end=225, fill=(200, 0, 0))
- draw.arc((0, 55, 50, 75), start=135, end=405, fill=(0, 200, 0))
- draw.line((25, 20, 25, 55), fill=(100, 200, 100), width=15)
- draw.ellipse((60, 0, 75, 15), fill=(0, 50, 100))
- draw.ellipse((60, 15, 75, 30), fill=(50, 100, 150))
- draw.ellipse((60, 30, 75, 45), fill=(100, 150, 200))
- draw.ellipse((60, 45, 75, 60), fill=(150, 200, 250))
- draw.ellipse((60, 60, 75, 75), fill=(200, 250, 255))
- image.save('res.jpg')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement