Clear info dicts in-place instead of replacing them with new ones

Sometimes it can cause fuckups, so who knows how PIL works with them...
This commit is contained in:
DarkPhoenix
2015-07-23 20:34:02 +03:00
parent 8c19a956e0
commit 505b0ce38f
2 changed files with 2 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ def get_icon_file(request):
img = Image.open(fullpath)
# Strip all additional image info (mostly for ICC color
# profiles, see issue #337)
img.info = {}
img.info.clear()
return img

View File

@@ -82,7 +82,7 @@ def get_render(type_id):
img.thumbnail(RENDER_SIZE, Image.ANTIALIAS)
# Strip all additional image info (mostly for ICC color
# profiles, see issue #337)
img.info = {}
img.info.clear()
return img