Python 获取图片格式及像素宽高信息 # coding: utf8 from PIL import Image img = Image.open("img.jpg") print img.sizeprint img.format