Skip to content

Commit

Permalink
chore: better defaulting of image resampling
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 4, 2024
1 parent 35a8d21 commit e7867eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/src/image_treatment_c/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def resize_image(self, image_path, width, height, image_type = JPEG_VALUE):
# setting the offset position to the initial one
image = PIL.Image.open(image_path)
algorithm = PIL.Image.ANTIALIAS if hasattr(PIL.Image, "ANTIALIAS") else\
PIL.Image.LANCZOS
(PIL.Image.LANCZOS if hasattr(PIL.Image, "LANCZOS") else None)
image_resize = image.resize((width, height), algorithm)
string_buffer = colony.StringBuffer(False)
image_resize.save(string_buffer, image_type)
Expand Down

0 comments on commit e7867eb

Please sign in to comment.