Skip to content

Rectangle Corners #6192

Closed Answered by radarhere
Polsulpicien asked this question in Q&A
Apr 10, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Are you looking for https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.rounded_rectangle ?

from PIL import Image, ImageDraw
im = Image.new("RGB", (20, 60))
draw = ImageDraw.Draw(im)
draw.rounded_rectangle((-10, 10, 10, 50), 3, fill="#999")
im.save("rounded_rectangle.png")

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Polsulpicien
Comment options

@radarhere
Comment options

@radarhere
Comment options

Answer selected by Polsulpicien
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants