diff --git a/main.py b/main.py index 98c461f..3753a3b 100644 --- a/main.py +++ b/main.py @@ -453,7 +453,7 @@ # Draw the text on top (white) draw.text((text_bbox[0], text_bbox[1]), answer, anchor="lt", font=font, fill="#333") - image.save(f"{DOWNLOAD_FOLDER}/{name_prefix}/{problem['index']}-ans.jpg") + image.convert(mode="RGB").save(f"{DOWNLOAD_FOLDER}/{name_prefix}/{problem['index']}-ans.jpg") # Replace the image in the list images[images.index(f"{DOWNLOAD_FOLDER}/{name_prefix}/{problem['index']}.jpg")] = f"{DOWNLOAD_FOLDER}/{name_prefix}/{problem['index']}-ans.jpg"