使用Python 2.4调整图像大小:_imaging C模块未安装
如何用Python 2.4版本调整图片大小。我想把它做成缩略图。
我已经下载了PIL库,但遇到了和这个链接里一样的问题。
有没有其他方法可以调整图片大小呢?
from PIL import Image
import glob, os
size = 40, 40
for infile in glob.glob("*.jpg"):
file, ext = os.path.splitext(infile)
im = Image.open(infile)
im.thumbnail(size, Image.ANTIALIAS)
im.save(file + ".thumbnail", "JPEG")
raise ImportError("没有安装 _imaging C 模块")