tflite icon indicating copy to clipboard operation
tflite copied to clipboard

Replace ANTIALIAS with LANCZOS in classify_image.py to fix compatibility issue with Pillow 10.0.0

Open Yen-Lung-Huang opened this issue 6 months ago • 2 comments

Background

In the latest version of Pillow (10.0.0), the ANTIALIAS attribute has been removed. This change caused the classify_image.py script to fail with an AttributeError.

Changes

  • Replaced ANTIALIAS with LANCZOS in the classify_image.py script to ensure compatibility with Pillow 10.0.0.
  • Verified that the script runs successfully with the updated attribute.

Testing

  • Ran the classify_image.py script with the updated code.
  • Confirmed that the script executes without errors and produces the expected results.

Impact

This change ensures that the classify_image.py script remains compatible with the latest version of Pillow, preventing runtime errors and improving overall stability.

Additional Notes

No other parts of the codebase were affected by this change. The modification is backward compatible with previous versions of Pillow.

Yen-Lung-Huang avatar Aug 02 '24 13:08 Yen-Lung-Huang