摘要: from PIL import Image def size(jpg,now_size): im = Image.open(jpg) width, height = im.size if width>now_size: n=width/now_size w=int(width/n) h=int(height/n) ... 阅读全文
posted @ 2018-10-13 17:24 zhangdingqu 阅读(1557) 评论(0) 推荐(0) 编辑
摘要: #导入cv模块 import cv2 as cv2 #读取图像,支持 bmp、jpg、png、tiff 等常用格式 def size(jpg,now_size): image = cv2.imread(jpg) # 读取图像大小 size = image.shape print('图像大小为', s 阅读全文
posted @ 2018-10-13 12:37 zhangdingqu 阅读(261) 评论(0) 推荐(0) 编辑