Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

plot path in pillow python

from PIL import Image, ImageDraw

with Image.open("hopper.jpg") as im:

    draw = ImageDraw.Draw(im)
    draw.line((0, 0) + im.size, fill=128)
    draw.line((0, im.size[1], im.size[0], 0), fill=128)

    # write to stdout
    im.save(sys.stdout, "PNG")
Source by pillow.readthedocs.io #
 
PREVIOUS NEXT
Tagged: #plot #path #pillow #python
ADD COMMENT
Topic
Name
8+3 =