Skip to content

Commit 269a878

Browse files
authored
Update image_processing.py
Fix for ANTIALIAS function beeing removed in Pillow 10.0.0 (after being deprecated through many previous versions). The same function is now called trough PIL.Image.LANCZOS or PIL.Image.Resampling.LANCZOS.
1 parent 9311967 commit 269a878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/codeproject_ai_object/image_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def process_image(self, image):
344344
# resize image if different then default
345345
if self._scale != DEAULT_SCALE:
346346
newsize = (self._image_width * self._scale, self._image_width * self._scale)
347-
self._image.thumbnail(newsize, Image.ANTIALIAS)
347+
self._image.thumbnail(newsize, Image.LANCZOS)
348348
self._image_width, self._image_height = self._image.size
349349
with io.BytesIO() as output:
350350
self._image.save(output, format="JPEG")

0 commit comments

Comments
 (0)