summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Fonseca <ramofojabuka@gmail.com>2024-02-10 15:42:53 +0100
committerRafael Fonseca <ramofojabuka@gmail.com>2024-02-10 15:42:53 +0100
commitb2f1c7301902f9c951316c1cdfa07d3ee31278a6 (patch)
tree0d10495653fc3eed2dc9a7665f26a28f5982a2ff
parent. (diff)
downloadgpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar.gz
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar.bz2
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar.lz
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar.xz
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.tar.zst
gpt4free-b2f1c7301902f9c951316c1cdfa07d3ee31278a6.zip
-rw-r--r--g4f/image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/image.py b/g4f/image.py
index f0ee0395..29194d6e 100644
--- a/g4f/image.py
+++ b/g4f/image.py
@@ -166,7 +166,7 @@ def process_image(img: Image, new_width: int, new_height: int) -> Image:
if img.mode != "RGB":
img.load()
white = new_image('RGB', img.size, (255, 255, 255))
- white.paste(img, mask=img.split()[3])
+ white.paste(img, mask=img.convert('RGBA').split()[-1])
return white
return img