from PIL import Image, ImageDraw im = Image.new('RGB', (300, 300), (255, 255, 255)) draw = ImageDraw.Draw(im) west_north = (100, 100) east_south = (200, 200) outline_color = (128, 128, 128) draw.rectangle([west_north, east_south], outline=outline_color) im.show()