Fix: save team's canvas issue. (#9518)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-08-18 13:05:29 +08:00
committed by GitHub
parent ba11312766
commit ca720bd811
4 changed files with 13 additions and 5 deletions

View File

@ -302,7 +302,7 @@ async def build_chunks(task, progress_callback):
# If the image is in RGBA mode, convert it to RGB mode before saving it in JPEG format.
if d["image"].mode in ("RGBA", "P"):
converted_image = d["image"].convert("RGB")
d["image"].close() # Close original image
#d["image"].close() # Close original image
d["image"] = converted_image
try:
d["image"].save(output_buffer, format='JPEG')