用户:朱江水查看:0 回复:0 评论:0 创建时间:2020-07-18T14:13:16
【作品展示】

【作品介绍】
如名
【作品源代码】
import os
from PIL import Image
myDir="BCM"
files=os.listdir(myDir)
images_ext=['.png',".jpg",".dpm",".jpeg",".gif"]
images=[]
for file in files:
name,ext=os.path.splitext(file)
if ext in images_ext and "bcm" in name:
img=Image.open(myDir+os.sep+file)
_img=img.resize((300,300))
images.append(_img)
print(images)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn