python - how to create a jpeg picture with a triangle of 3 specific point and specific color -
Now I'm trying to create JPG pictures with 3 distinct points and a special color triangle.
By the way:
A JPG picture (256 * 256) I get three points and draw a triangle filled with JPEG with a specific color color
I with Python I am using Python 2 (by forked PIL)
You can draw a polygon: / P>
import image from PIL, image by dot point = (20,20), (20, 100), (10020) IM = image. NY ('RGB', (255, 255)) Draw = ImageDraw.Draw (IM) Dropoline (Points) # Outline = 'Red', Fill = 'Blue' IIM ('Triangle .jpg')
Comments
Post a Comment