-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pillow 10.0.0 has no font.getsize() #7322
Labels
Comments
Hi. This was actually deliberately removed. See https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#font-size-and-offset-methods for information about what you can use instead. |
radarhere
changed the title
pillow 10 has no font.getsize()
Pillow 10 has no font.getsize()
Aug 6, 2023
So in this case, it would be from PIL import ImageFont
font = ImageFont.truetype("/home/jack/fonts/DejaVuSans-Bold.ttf", 41)
left, top, right, bottom = font.getbbox("pharetra. purus")
width = right - left
height = bottom - top
print(width, height) |
radarhere
changed the title
Pillow 10 has no font.getsize()
Pillow 10.0.0 has no font.getsize()
Aug 6, 2023
Closing this issue as no feedback has been received. |
chris34
added a commit
to inyokaproject/inyoka
that referenced
this issue
Aug 26, 2023
for the fix in Pillow see python-pillow/Pillow#7322
link2xt
added a commit
to deltachat/mailadm
that referenced
this issue
Sep 6, 2023
link2xt
added a commit
to deltachat/mailadm
that referenced
this issue
Sep 6, 2023
link2xt
added a commit
to deltachat/mailadm
that referenced
this issue
Sep 6, 2023
jbesq-ml
added a commit
to jbesq-ml/keras-ocr
that referenced
this issue
Aug 30, 2024
python-pillow/Pillow#7322 change .getsize to get bbox because pillow changed the call
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had pillow 10.0.0 I removed it and installed pillow==9.0.1 and that fixed it. Pillow 10 has no getsize()
The text was updated successfully, but these errors were encountered: