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:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user