猫史档案馆


【Python作品分享】镂空效果U·ェ·U【作业帖】

用户:WMoSo岛同号WMoSo岛同号查看:0 回复:1 评论:0 创建时间:2020-06-01T09:31:12


【作品展示】

center_image

 

【作品介绍】

9989889898tr

 

【作品源代码】

from PIL import Image
import matplotlib.pyplot as plt
img = Image.open('bcm-1.jpg').convert("RGBA")
width, height = img.size
for i in range(width):
 img.putpixel((i, height//2), (0, 0, 0, 0))
 img.putpixel((width//2, i), (0, 0, 0, 0))
plt.imshow(img)
plt.show()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
WMoSo岛同号WMoSo岛同号

呵呵,我是瞎搞的

点赞0


评论