From dab6e09a8a8bc0687e9cd87a5201ed2c077a8be9 Mon Sep 17 00:00:00 2001 From: Phin <59180111+phin05@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:18:51 +0530 Subject: [PATCH] Fixed a pixel mode issue during image upload --- core/imgur.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/imgur.py b/core/imgur.py index ae4b4dc..82cddf8 100644 --- a/core/imgur.py +++ b/core/imgur.py @@ -9,7 +9,7 @@ import requests def uploadToImgur(url: str) -> Optional[str]: try: originalImageBytesIO = io.BytesIO(requests.get(url).content) - originalImage = Image.open(originalImageBytesIO) + originalImage = Image.open(originalImageBytesIO).convert("RGB") newImage = Image.new("RGB", originalImage.size) newImage.putdata(originalImage.getdata()) # pyright: ignore[reportArgumentType] maxSize = config["display"]["posters"]["maxSize"]