smartcrop.py
smartcrop.py copied to clipboard
Fix Image.ANTIALIAS deprecation
Pillow is in the process of migrating the Image.ANTIALIAS
constant to Image.Resampling.LANCZOS
, and is showing DeprecationWarnings when running smartcrop.py
:
python smartcrop.py ./tests/images/travel-1.jpg /tmp/out.jpg
./smartcrop.py:160: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
# repeated
This PR implements the suggested fix. Thanks for your help!