fix mask creation
Browse files
app.py
CHANGED
@@ -42,7 +42,11 @@ def prepare_image_and_mask(
|
|
42 |
fill="white",
|
43 |
)
|
44 |
mask = Image.new("RGB", image.size, "black")
|
45 |
-
mask = ImageOps.expand(
|
|
|
|
|
|
|
|
|
46 |
return background, mask
|
47 |
|
48 |
|
|
|
42 |
fill="white",
|
43 |
)
|
44 |
mask = Image.new("RGB", image.size, "black")
|
45 |
+
mask = ImageOps.expand(
|
46 |
+
mask,
|
47 |
+
border=(padding_left, padding_top, padding_right, padding_bottom),
|
48 |
+
fill="white",
|
49 |
+
)
|
50 |
return background, mask
|
51 |
|
52 |
|