johnhelf commited on
Commit
eb10b93
·
1 Parent(s): a628810

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -29,8 +29,10 @@ def imGreyAlpha(im):
29
  alpha = px[i, j] # 获取灰度作为alpha值
30
  if alpha == 0:
31
  draw.point((i,j), fill=(0,0,0,0))
 
 
32
  else:
33
- draw.point((i, j), fill=(0, 0, 0, alpha)) # 填充像素点
34
 
35
 
36
  return im2 # 返回图像
 
29
  alpha = px[i, j] # 获取灰度作为alpha值
30
  if alpha == 0:
31
  draw.point((i,j), fill=(0,0,0,0))
32
+ # elif alpha == 255:
33
+ # draw.point((i,j), fill=(0,0,0,255))
34
  else:
35
+ draw.point((i, j), fill=(255, 255, 255, 255 -alpha)) # 填充像素点
36
 
37
 
38
  return im2 # 返回图像