Initial commit

This commit is contained in:
Le Ma
2024-12-03 11:34:51 +13:00
commit b44d0668f7
1381 changed files with 3384 additions and 0 deletions

14
mask_split.py Normal file
View File

@@ -0,0 +1,14 @@
from PIL import Image
from PIL import Image
# 打开目标图片和线条蒙版
image = Image.open("birds.png").convert("RGBA")
mask = Image.open("mask.png").convert("L") # 灰度图
# 将蒙版应用到图片上
# mask 是透明区域255 表示不透明0 表示完全透明
image.putalpha(mask)
# 保存结果
image.save("result.png")