lawsie/guizero

Pillow.Image.ANTIALIAS is deprecated and will be removed

martinohanlon opened this issue · 1 comments

Describe the bug
guizero uses the Pillow constant Image.ANTIALIAS which is deprecated and will be removed in pillow 10.

Resizing an image generates the following warning:

c:\users\martin\documents\lawsie\guizero-dev\guizero\guizero\utilities.py:224: DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
    resized_image = self._pil_image.resize((self._width, self._height), Image.ANTIALIAS)

It should be as simple as replacing with:

    resized_image = self._pil_image.resize((self._width, self._height))

and using the default resampling function.

Released in v1.4.0