Skip to content

Commit 97e0cda

Browse files
authored
Merge pull request #1 from NeoMod/NeoMod-patch-antialias-pillow
Update image_processing.py to provide a fix for ANTIALIAS function being removed in Pillow 10.0.0
2 parents 9311967 + 269a878 commit 97e0cda

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)