2011-01-06 73 views
0

如何调整与Python 2.4 version.I图像我试图牛逼使它成为一个缩略图调整图像的大小与Python 2.4:将_imaging C模块中没有安装

我已经下载thePIL librrary但我面临同样的问题为https://stackoverflow.com/questions/4134966/problem-in-the-installed-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("The _imaging C module is not installed")

+0

我有同样的问题。在** python 2.7.8 **(当前最新版本)的干净安装之上清洁安装** PIL 1.1.7 **(当前最新版本)修复了这个问题。确保你的Python 2.7是** 32位**。 – 2014-08-02 15:10:40

回答