From 44a042df6d8be66568d627bf9af96aa2fbda3060 Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 7 Jan 2013 23:08:45 +0100 Subject: [PATCH] plugin XEP-0054: fixed bad image resizing --- src/plugins/plugin_xep_0054.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugin_xep_0054.py b/src/plugins/plugin_xep_0054.py index 7f793118..71baf096 100755 --- a/src/plugins/plugin_xep_0054.py +++ b/src/plugins/plugin_xep_0054.py @@ -232,14 +232,14 @@ class XEP_0054(): return "" return filename - def _buildSetAvatar(self, vcard_set, filepath): + def _buildSetAvatar(self, vcard_set, filepath): try: img = Image.open(filepath) except IOError: raise exceptions.DataError("Can't open image") if img.size != (64, 64): - img.resize((64, 64)) + img = img.resize((64, 64)) img_buf = StringIO() img.save(img_buf, 'PNG')