From ee7ad2bafe5cde2809d238efef7c38e38b2d34de Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 1 Mar 2018 09:04:36 +0100 Subject: [PATCH] plugin XEP-0054: removed Image.ANTIALIAS filter: Image.ANTIALIAS filter is not needed anymore in Pillow: http://pillow.readthedocs.io/en/3.0.x/releasenotes/2.7.0.html#default-filter-for-thumbnails --- src/memory/cache.py | 1 - src/plugins/plugin_xep_0054.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/memory/cache.py b/src/memory/cache.py index e5288a4d..97152b44 100644 --- a/src/memory/cache.py +++ b/src/memory/cache.py @@ -70,7 +70,6 @@ class Cache(object): except IOError: log.warning(u"can't read cache at {}".format(cache_url)) return None - except pickle.UnpicklingError: log.warning(u'invalid cache found at {}'.format(cache_url)) return None diff --git a/src/plugins/plugin_xep_0054.py b/src/plugins/plugin_xep_0054.py index 004f3862..1ad83583 100755 --- a/src/plugins/plugin_xep_0054.py +++ b/src/plugins/plugin_xep_0054.py @@ -445,7 +445,7 @@ class XEP_0054(object): return Failure(exceptions.DataError(u"Can't open image")) if img.size != AVATAR_DIM: - img.thumbnail(AVATAR_DIM, Image.ANTIALIAS) + img.thumbnail(AVATAR_DIM) if img.size[0] != img.size[1]: # we need to crop first left, upper = (0, 0) right, lower = img.size