--- a/src/pyams_file/image.py Mon Nov 19 13:24:44 2018 +0100
+++ b/src/pyams_file/image.py Mon Nov 19 14:50:38 2018 +0100
@@ -89,7 +89,7 @@
# generate thumbnail
new_image = BytesIO()
image.resize((width, height), Image.ANTIALIAS) \
- .filter(ImageFilter.SHARPEN) \
+ .filter(ImageFilter.UnsharpMask(radius=0.5, percent=100, threshold=0)) \
.save(new_image, format)
return new_image, format.lower()
@@ -136,7 +136,7 @@
thumb_size = self.get_thumb_size(width, height, geometry)
image.crop((geometry.x1, geometry.y1, geometry.x2, geometry.y2)) \
.resize(thumb_size, Image.ANTIALIAS) \
- .filter(ImageFilter.SHARPEN) \
+ .filter(ImageFilter.UnsharpMask(radius=0.5, percent=100, threshold=0)) \
.save(new_image, format)
return new_image, format.lower()