- from PIL import Image
-
-
- img = Image.open("01.png")#主图
- img_shuiyin = Image.open('水印.png')
- img.paste(img_shuiyin,(0,0))
-
- img.show()
- img.save("1.png")
效果——无法使用透明图片:

img.paste(img_shuiyin,(0,0),img_shuiyin)
- from PIL import Image
-
-
- img = Image.open("01.png")#主图
- img_shuiyin = Image.open('水印.png')
- img.paste(img_shuiyin,(0,0),img_shuiyin)
-
- img.show()
- img.save("1.png")
