用户:
胡白查看:0 回复:0 评论:0 创建时间:2020-07-02T20:25:12
【作品展示】

【作品介绍】
wu233
【作品源代码】
from PIL import Image,ImageOps
import matplotlib.pyplot as plt
img = Image.open('bcm.jpg').convert("RGBA").resize((256,256))
width, height = img.size
horse = Image.open('horse.png').convert("L").resize(img.size)
img.putalpha(horse)
#level = 10
_, axes = plt.subplots(1, 4, figsize=(30,30))
## alpha =int(255/level*l)
plt.rcParams['image.cmap'] = 'gray'
axes[0].imshow(img)
axes[1].imshow(horse)
horse = ImageOps.invert(horse)
axes[2].imshow(horse)
img.putalpha(horse)
axes[3].imshow(horse)
plt.show()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn