Skip to content

Commit

Permalink
fix thumbnail icc profile (#7338)
Browse files Browse the repository at this point in the history
* fix thumbnail icc profile

* update

---------

Co-authored-by: 孙永强 <[email protected]>
  • Loading branch information
awu0403 and 孙永强 authored Jan 18, 2025
1 parent 9760eca commit 1c89557
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion seahub/thumbnail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def _create_thumbnail_common(fp, thumbnail_file, size):
save_type = THUMBNAIL_EXTENSION
if image.mode in ['RGBA', 'P']:
save_type = 'png'
image.save(thumbnail_file, save_type)
icc_profile = image.info.get('icc_profile')
image.save(thumbnail_file, save_type, icc_profile=icc_profile)
return (True, 200)

def extract_xmind_image(repo_id, path, size=XMIND_IMAGE_SIZE):
Expand Down

0 comments on commit 1c89557

Please sign in to comment.