2011-01-06 7 views
0

Wie ein Bild mit Python 2.4 version.I, um die Größe versuche t es sich um eine Thumbnail-Ändern der Größe eines Bildes mit Python 2.4: Das _imaging C-Modul nicht installiert ist

I thePIL librrary heruntergeladen haben zu machen, aber das gleiche Problem bin vor als https://stackoverflow.com/questions/4134966/problem-in-the-installed-pil.

Gibt es eine andere Möglichkeit, das Bild

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

Ich hatte das gleiche Problem. Saubere Installation von ** PIL 1.1.7 ** (aktuell aktuell) oben auf der sauberen Installation auf ** python 2.7.8 ** (aktuell aktuell) behebt das Problem. Stellen Sie sicher, dass Ihr Python 2.7 ** 32-Bit ** ist. –

Antwort