BraUndress commited on
Commit
3c0ac06
·
verified ·
1 Parent(s): 03a1944

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -212,14 +212,7 @@ def dummy(img):
212
  alpha_channel = img["layers"][0][:, :, 3]
213
  mask = np.where(alpha_channel == 0, 0, 255).astype(np.uint8)
214
 
215
- # 将蒙版转换为与原始图像相同分辨率的图像
216
- mask_image_pil = Image.fromarray(mask)
217
- mask_image_resized = mask_image_pil.resize((composite_width, composite_height), Image.ANTIALIAS)
218
-
219
- # 将调整大小后的蒙版图像转换回 numpy 数组
220
- mask_resized = np.array(mask_image_resized)
221
-
222
- return mask_resized
223
 
224
 
225
 
 
212
  alpha_channel = img["layers"][0][:, :, 3]
213
  mask = np.where(alpha_channel == 0, 0, 255).astype(np.uint8)
214
 
215
+ return mask
 
 
 
 
 
 
 
216
 
217
 
218