mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-27 18:20:25 +00:00
Catch KeyError on image.info dictionary
This commit is contained in:
parent
8bab75b331
commit
eda3fc3c91
1 changed files with 4 additions and 1 deletions
|
|
@ -227,7 +227,10 @@ class AutoConvert(object):
|
|||
matte = True
|
||||
elif img.mode == 'P':
|
||||
if self.format in PALETTE_TRANSPARENCY_FORMATS:
|
||||
self.save_kwargs['transparency'] = img.info['transparency']
|
||||
try:
|
||||
self.save_kwargs['transparency'] = img.info['transparency']
|
||||
except KeyError:
|
||||
pass
|
||||
elif self.format in RGBA_TRANSPARENCY_FORMATS:
|
||||
# Currently PIL doesn't support any RGBA-mode formats that
|
||||
# aren't also P-mode formats, so this will never happen.
|
||||
|
|
|
|||
Loading…
Reference in a new issue