Mercurial > libervia-backend
diff src/plugins/plugin_xep_0054.py @ 570:bf1505df088c
plugin XEP-0054: fixed bad image resizing
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 07 Jan 2013 23:08:45 +0100 |
parents | 0bb2e0d1c878 |
children | ca13633d3b6b |
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')