Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add rectangle to image python

from PIL import ImageDraw

draw = ImageDraw.Draw(<your_image>)
draw.rectangle(((20, 30), (10, 10)), fill="white")		# (x1, y1), (x2, y2)

plt.imshow(test)
 
PREVIOUS NEXT
Tagged: #add #rectangle #image #python
ADD COMMENT
Topic
Name
9+7 =