Untitled
unknown
plain_text
a year ago
595 B
3
Indexable
from PIL import ImageDraw # Create a new image with the dimensions for the cup design # Assuming the cup dimensions: height 10 cm (1000 pixels), diameter 8 cm (800 pixels) cup_height = 1000 cup_diameter = 800 # Resize the pattern image to fit the cup design dimensions pattern_resized = image.resize((cup_diameter, cup_height)) # Create a new image with a white background cup_design = Image.new("RGB", (cup_diameter, cup_height), "white") # Paste the resized pattern onto the new image cup_design.paste(pattern_resized, (0, 0)) # Display the cup design cup_design.show()
Editor is loading...
Leave a Comment