# HG changeset patch # User Goffi # Date 1357596525 -3600 # Node ID bf1505df088c9af5cf9e28e84effbdaff026a2ed # Parent 06faf5bffbc03f64aa50e981221e68e8900ab604 plugin XEP-0054: fixed bad image resizing diff -r 06faf5bffbc0 -r bf1505df088c src/plugins/plugin_xep_0054.py --- 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')