Use pil lanczos.
This commit is contained in:
parent
4e1ef81c20
commit
12bf381fa2
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue