diff --git a/flask_appbuilder/filemanager.py b/flask_appbuilder/filemanager.py index 463072686a..2a81310d3f 100644 --- a/flask_appbuilder/filemanager.py +++ b/flask_appbuilder/filemanager.py @@ -204,17 +204,17 @@ def resize(self, image, size): """ Resizes the image - :param image: The image object - :param size: size is PIL tuple (width, heigth, force) ex: (200,100,True) + :param image: The image object + :param size: size is PIL tuple (width, height, force) ex: (200,100,True) """ (width, height, force) = size if image.size[0] > width or image.size[1] > height: if force: - return ImageOps.fit(self.image, (width, height), Image.ANTIALIAS) + return ImageOps.fit(self.image, (width, height), Image.LANCZOS) else: thumb = self.image.copy() - thumb.thumbnail((width, height), Image.ANTIALIAS) + thumb.thumbnail((width, height), Image.LANCZOS) return thumb return image diff --git a/requirements-extra.txt b/requirements-extra.txt index 5208e2b0d0..f9ce44c6f5 100644 --- a/requirements-extra.txt +++ b/requirements-extra.txt @@ -1,4 +1,4 @@ -Pillow~=9.1 +Pillow~=10.0.1 cython==0.29.17 mysqlclient==2.0.1 psycopg2-binary==2.9.6