From 3786304926e4b8d37180f89a9068ccbaa2504751 Mon Sep 17 00:00:00 2001 From: satori Date: Sun, 3 Dec 2023 17:41:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E4=B8=8D=E6=98=AF=E4=B8=89=E9=80=9A?= =?UTF-8?q?=E9=81=93=E7=9A=84=E5=9B=BE=E5=83=8F=E8=BD=AC=E6=8D=A2=E4=B8=BA?= =?UTF-8?q?=E4=B8=89=E9=80=9A=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pp.py b/pp.py index 5fe6d7d..b4f0850 100755 --- a/pp.py +++ b/pp.py @@ -42,7 +42,7 @@ def download_image(url: str) -> Image.Image: else: response = requests.get(url) img = Image.open(io.BytesIO(response.content)) - if img.mode != 'RGB' + if img.mode != 'RGB': img = img.convert('RGB') return img except Exception as e: