mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-14 07:24:58 +00:00
Fix preview PSD images (#5217)
Fixed PSD image preview as modules in psd_tools module changed. https://psd-tools.readthedocs.io/en/latest/migration.html
This commit is contained in:
parent
e96b0c0bce
commit
f20e8b8b2a
@ -163,9 +163,9 @@ def create_psd_thumbnails(repo, file_id, path, size, thumbnail_file, file_size):
|
||||
inner_path = gen_inner_file_get_url(token, os.path.basename(path))
|
||||
tmp_file = os.path.join(tempfile.gettempdir(), file_id)
|
||||
urlretrieve(inner_path, tmp_file)
|
||||
psd = PSDImage.load(tmp_file)
|
||||
psd = PSDImage.open(tmp_file)
|
||||
|
||||
merged_image = psd.as_PIL()
|
||||
merged_image = psd.topil()
|
||||
merged_image.save(tmp_img_path)
|
||||
os.unlink(tmp_file) # remove origin psd file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user