How to resize an image with python 2.4 ver开发者_Python百科sion.I am trying t make it a thumbnail
I have downloaded thePIL librrary but am facing the same problem as https://stackoverflow.com/questions/4134966/problem-in-the-installed-pil.
Is there any other way to resize the image
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")
I think that is the same question : PIL error: The _imaging C module is not installed
I hope that it will fix your problem !
精彩评论