diff --git a/imjoy_elfinder/elfinder.py b/imjoy_elfinder/elfinder.py index 1c4ada0..7f1f6c2 100644 --- a/imjoy_elfinder/elfinder.py +++ b/imjoy_elfinder/elfinder.py @@ -1093,7 +1093,7 @@ def __resize(self) -> None: try: img = self._img.open(cur_file) # type: ignore img_resized = img.resize( - (width, height), self._img.ANTIALIAS # type: ignore + (width, height), self._img.Resampling.LANCZOS # type: ignore ) img_resized.save(cur_file) self._rm_tmb(cur_file) @@ -1796,7 +1796,7 @@ def _tmb(self, path: str, tmb_path: str) -> bool: box = _crop_tuple(img.size) if box: img = img.crop(box) - img.thumbnail(size, self._img.ANTIALIAS) # type: ignore + img.thumbnail(size, self._img.Resampling.LANCZOS) # type: ignore img.save(tmb_path, "PNG") # UnidentifiedImageError requires Pillow 7.0.0 except (OSError, ValueError) as exc: