From 1c8955723d8c857ad96d7b1f00d841136e57dd61 Mon Sep 17 00:00:00 2001 From: awu0403 <76416779+awu0403@users.noreply.github.com> Date: Sat, 18 Jan 2025 09:56:05 +0800 Subject: [PATCH] fix thumbnail icc profile (#7338) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix thumbnail icc profile * update --------- Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com> --- seahub/thumbnail/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seahub/thumbnail/utils.py b/seahub/thumbnail/utils.py index b8b64d39778..a1c52c627dc 100644 --- a/seahub/thumbnail/utils.py +++ b/seahub/thumbnail/utils.py @@ -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):