Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Iconolatry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ def load(self, path_image):
image = self.extract(path_image)

## Manage resize.
image = self.ico_resize(image, how = self.type_resize, method = Image.ANTIALIAS)
image = self.ico_resize(image, how = self.type_resize, method = Image.LANCZOS)

## Manage ICC profile.
if 'icc_profile' in image.info:
Expand Down Expand Up @@ -1220,7 +1220,7 @@ def ico_palette(self, image):
temp.append(self.parameters['palette'][i : i + step][::-1] + b'\x00')
self.parameters['palette'] = b"".join(temp)

def ico_resize(self, image, how = 'up256_prop', method = Image.ANTIALIAS):
def ico_resize(self, image, how = 'up256_prop', method = Image.LANCZOS):
""" Resizes to `.ico` / `.cur` dimensions. """
old_w, old_h = image.size
sizes = [16, 24, 32, 48, 64, 128, 256]
Expand Down
4 changes: 2 additions & 2 deletions Metamorphosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def __init__(self, parameters, options):
self.parameters = parameters
self.options = options

def resize_meth(self, image, method = Image.ANTIALIAS):
def resize_meth(self, image, method = Image.LANCZOS):
""" Resizes PIL image to a maximum size specified maintaining the aspect ratio.
Allows usage of different resizing methods and does not modify the image in place,
then creates an exact square image.
Expand Down Expand Up @@ -297,7 +297,7 @@ def resize_exec(self, image_list):
scale_x = w_fin / w_ini
scale_y = h_fin / h_ini

image_list = [self.resize_meth(image_list[i], method = Image.ANTIALIAS) for i in range(self.parameters['count'])]
image_list = [self.resize_meth(image_list[i], method = Image.LANCZOS) for i in range(self.parameters['count'])]

## Scale hotspots.
self.parameters['hotx'] = int(0.5 * ceil(2.0 * (self.parameters['hotx'] * scale_x)))
Expand Down