Skip to content

Conversation

BingliangLi
Copy link

No description provided.

@mostcat
Copy link

mostcat commented Apr 29, 2025

The ImageDraw object does not have a textsize attribute. This is because in Pillow version 10.0.0, the textsize method has been deprecated, and it is recommended to use textlength and textbbox instead.

                bbox = draw.textbbox((0, 0), text, font=font)
                tw = bbox[2] - bbox[0]
                th = bbox[3] - bbox[1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants