Skip to content
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

upgrade pillow to 10.0.0 #10405

Merged
merged 1 commit into from
Jul 17, 2023
Merged

upgrade pillow to 10.0.0 #10405

merged 1 commit into from
Jul 17, 2023

Conversation

livingbody
Copy link
Contributor

  • 修改requirements.txt,pillow版本10.0.0以上
  • 修改相关联的文件,修改长宽获取api
  • 修改常量名称: Image.ANTIALIAS-> Image.LANCZOS

ex:

  • previous:
width, height = font.getsize("Hello world")
  • Now:
left, top, right, bottom = font.getbbox("Hello world")
width, height = right - left, bottom - top

@paddle-bot
Copy link

paddle-bot bot commented Jul 17, 2023

Thanks for your contribution!

Copy link
Collaborator

@shiyutang shiyutang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -15,4 +15,4 @@ premailer
openpyxl
attrdict
PyMuPDF<1.21.0
Pillow<=9.5.0
Pillow>=10.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问这些修改是只在10.0.0以上版本有效嘛?如果能够做到向后兼容的话会更好一些

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.0将API接口替换了,之前的接口废弃,因此不能做到向后兼容:https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#backwards-incompatible-changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Member

@Bobholamovic Bobholamovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@shiyutang shiyutang merged commit 49d1a59 into PaddlePaddle:dygraph Jul 17, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants