changeset 570:bf1505df088c

plugin XEP-0054: fixed bad image resizing
author Goffi <goffi@goffi.org>
date Mon, 07 Jan 2013 23:08:45 +0100
parents 06faf5bffbc0
children 1cb24325485c
files src/plugins/plugin_xep_0054.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0054.py	Mon Jan 07 01:03:49 2013 +0100
+++ b/src/plugins/plugin_xep_0054.py	Mon Jan 07 23:08:45 2013 +0100
@@ -232,14 +232,14 @@
             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')