This media is not supported in your browser
VIEW IN TELEGRAM
Working on new cut & paste feature, here shown.
(A bit slow, because running in developer mode)
(A bit slow, because running in developer mode)
# Import random and pillow modules
import random
from PIL import Image, ImageDraw
# Set up image size
image_width = 600
image_height = 600
# Create a new image
image = Image.new('RGB', (image_width, image_height))
draw = ImageDraw.Draw(image)
# Draw multiple randomly sized boxes on the image
for i in range(100):
box_size = random.randrange(10, 50)
x = random.randrange(0, image_width - box_size)
y = random.randrange(0, image_height - box_size)
draw.rectangle([x, y, x + box_size, y + box_size], fill=(255, 255, 255))
# Save the image
image.save('wireframe.jpg')
