mirror of
https://github.com/phin05/discord-rich-presence-plex
synced 2024-11-22 01:23:02 +00:00
Fixed a pixel mode issue during image upload
This commit is contained in:
parent
cc03fbbf8b
commit
dab6e09a8a
1 changed files with 1 additions and 1 deletions
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue