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
This commit is contained in:
Goffi 2018-03-01 09:04:36 +01:00
commit ee7ad2bafe
2 changed files with 1 additions and 2 deletions

View file

@ -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

View file

@ -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