[Backport] Fixed SVG thumbnail generation

remotes/origin/3.4.0rc
Jesús Espino 2017-07-21 09:45:57 +02:00
parent 0ddbf27d5c
commit 61c0653898
1 changed files with 5 additions and 2 deletions

View File

@ -57,11 +57,14 @@ try:
except Exception:
pass
Image.init()
# PSD thumbnail generator
def psd_image_factory(data, *args):
return PSDImage.from_stream(data).as_PIL()
try:
return PSDImage.from_stream(data).as_PIL()
except Exception:
raise TypeError
Image.init()
Image.register_open("PSD", psd_image_factory)