summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
Diffstat (limited to '')
-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