From 12bf381fa23f8b3db9d8c484df348c34fbe6fd54 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 3 Aug 2022 18:49:27 -0700 Subject: [PATCH] Use pil lanczos. --- LICENSE.txt | 2 +- imagecrunch/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 3caf10a..9e47453 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2021, Ethan Dalool aka voussoir +Copyright (c) 2022, Ethan Dalool aka voussoir All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/imagecrunch/plugin.py b/imagecrunch/plugin.py index 58760b5..79857ca 100644 --- a/imagecrunch/plugin.py +++ b/imagecrunch/plugin.py @@ -94,7 +94,7 @@ def imagecrunch(book, options): data = io.BytesIO() # i = i.convert('L') new_dimension = fit_into_bounds(*i.size, options['max_dimension'], options['max_dimension'], only_shrink=True) - i = i.resize(new_dimension, resample=PIL.Image.ANTIALIAS) + i = i.resize(new_dimension, resample=PIL.Image.LANCZOS) i.save(data, format='jpeg', quality=options['quality']) data.seek(0) new_size = len(data.read())