Spaces:
Configuration error
Configuration error
Update utils.py
Browse files
utils.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from PIL import Image
|
2 |
|
3 |
|
4 |
-
def
|
5 |
background = Image.new("RGBA", img.size, (255, 255, 255))
|
6 |
result = Image.alpha_composite(background, img.convert("RGBA"))
|
7 |
result = result.convert("RGB")
|
|
|
1 |
from PIL import Image
|
2 |
|
3 |
|
4 |
+
def overlay_on_white_background(img: Image):
|
5 |
background = Image.new("RGBA", img.size, (255, 255, 255))
|
6 |
result = Image.alpha_composite(background, img.convert("RGBA"))
|
7 |
result = result.convert("RGB")
|