Skip to content

fix: replace Image.BICUBIC with Image.Resampling.BICUBIC #134

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

Merged
merged 1 commit into from
Apr 4, 2023
Merged

fix: replace Image.BICUBIC with Image.Resampling.BICUBIC #134

merged 1 commit into from
Apr 4, 2023

Conversation

elenacliu
Copy link
Contributor

Hi, I want to release code for my paper these days and we use your code for preprocessing. I found that there were warnings about Image.BICUBIC which will be deprecated in 2023.7, so I modified them to Image.Resampling.BICUBIC, which is suggested by the package Pillow.

@sicxu sicxu merged commit f221678 into sicxu:master Apr 4, 2023
@elenacliu
Copy link
Contributor Author

Thank you for your quick feedback!

@remilvus
Copy link

remilvus commented Apr 5, 2023

Hi, it seems to me that this change broke instructions for running the code from README. The version of the Pillow package specified in environment.yml doesn't have Image.Resampling. Now, the code throws an error:
AttributeError: module 'PIL.Image' has no attribute 'Resampling'

@elenacliu
Copy link
Contributor Author

@remilvus I checked my environment, what you said is true because Pillow package of my project is 9.2.0 while in this project it is 6.2.1. I will handle this soon.

@sicxu
Copy link
Owner

sicxu commented Apr 6, 2023

@remilvus I didn't carefully check the PR, sorry for your inconvenience. @elenacliu You may make a new PR to change the code and environment.yml for this update if necessary.

@remilvus
Copy link

remilvus commented Apr 6, 2023

Hi, no problem, it's an easy thing to overlook. Thanks for your quick reaction!

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.

3 participants