Skip to content

Instantly share code, notes, and snippets.

View jeroenboeye's full-sized avatar

Jeroen Boeye jeroenboeye

View GitHub Profile
@jmhwang
jmhwang / draw_ractangle.py
Created September 12, 2017 00:57
python PIL draw rectangle
# https://stackoverflow.com/questions/34255938/is-there-a-way-to-specify-the-width-of-a-rectangle-in-pil
from PIL import Image, ImageDraw, ImageFont
# get an image
im = Image.open('image.jpg').convert('RGBA')
draw = ImageDraw.Draw(im)
draw.rectangle(((200, 200), (100, 100)), outline="#ff8888")
del draw
im.show()