摘要: from PIL import Image path = './test.png' # 加载图片 im = Image.open(path) # 显示图片 im.show() # 图片大小 w, h = im.size x, y = 0, 0 box = (x*w, y*h, (x+1)*w, (y 阅读全文
posted @ 2021-05-14 16:25 太晓 阅读(485) 评论(0) 推荐(0) 编辑
摘要: path = './test/' # 创建路径 def mkdir(path): if not os.path.exists(path): os.makedirs(path) # 查文件列表 os.listdir(path) # 判断是否为文件夹 os.path.isdir(path) # 判断是否 阅读全文
posted @ 2021-05-14 15:04 太晓 阅读(34) 评论(0) 推荐(0) 编辑