摘要:
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) ... 阅读全文
摘要:
#导入cv模块 import cv2 as cv2 #读取图像,支持 bmp、jpg、png、tiff 等常用格式 def size(jpg,now_size): image = cv2.imread(jpg) # 读取图像大小 size = image.shape print('图像大小为', s 阅读全文