diff --git a/icoconvert.py b/icoconvert.py index 633646e..1f5a9da 100644 --- a/icoconvert.py +++ b/icoconvert.py @@ -131,7 +131,7 @@ def load_image(filename): image = PIL.Image.open(filename) (w, h) = image.size (new_w, new_h) = imagetools.fit_into_bounds(w, h, 256, 256, only_shrink=True) - image = image.resize((new_w, new_h), resample=PIL.Image.ANTIALIAS) + image = image.resize((new_w, new_h), resample=PIL.Image.LANCZOS) image = image.convert('RGBA') image = imagetools.pad_to_square(image) return image diff --git a/resize.py b/resize.py index 2bf00d9..f5d55b0 100644 --- a/resize.py +++ b/resize.py @@ -103,7 +103,7 @@ def resize( raise ValueError('Cannot overwrite input file without OUTPUT_INPLACE.') log.debug('Resizing %s to %dx%d.', file.absolute_path, width, height) - resampler = PIL.Image.NEAREST if nearest_neighbor else PIL.Image.ANTIALIAS + resampler = PIL.Image.NEAREST if nearest_neighbor else PIL.Image.LANCZOS image = image.resize( (width, height), resampler) if output_file.extension == '.jpg':