2011-01-06 50 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

回答