Skip to content

Commit

Permalink
fix: rgb bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Jan 6, 2024
1 parent 955ab1b commit b3d50b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bereal/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def process_image(

# Save the result in the output folder
output_path = os.path.join(output_folder, f"combined_{primary_filename}")

# ensure the photo is jpg ready
primary_image = primary_image.convert("RGB")

primary_image.save(output_path, quality=IMAGE_QUALITY)

logger.debug("Combined image saved at %s", output_path)
Expand Down
2 changes: 2 additions & 0 deletions bereal/videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def create_endcard(phone: str, year: str, n_images: int, font_size: int = 50, of
draw.text((x, y), text, font=font, fill="white")

encard_image_path = os.path.join(CONTENT_PATH, phone, year, "endcard.png")

img = img.convert("RGB")
img.save(encard_image_path, quality=IMAGE_QUALITY)

return encard_image_path
Expand Down

0 comments on commit b3d50b0

Please sign in to comment.