LPX55 commited on
Commit
d2516f0
·
verified ·
1 Parent(s): d847f85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -164,9 +164,9 @@ def prepare_image_and_mask(image, width, height, overlap_percentage, resize_opti
164
  margin_y = max(0, min(margin_y + y_offset, target_size[1] - new_height))
165
 
166
  if image.mode == "RGBA":
167
- background = Image.new("RGBA", target_size, (255, 255, 255, 255)
168
  else:
169
- background = Image.new("RGB", target_size, (255, 255, 255)
170
 
171
  background.paste(source, (margin_x, margin_y))
172
 
 
164
  margin_y = max(0, min(margin_y + y_offset, target_size[1] - new_height))
165
 
166
  if image.mode == "RGBA":
167
+ background = Image.new("RGBA", target_size, (255, 255, 255, 255))
168
  else:
169
+ background = Image.new("RGB", target_size, (255, 255, 255))
170
 
171
  background.paste(source, (margin_x, margin_y))
172