开发者

Resize an image with python 2.4: The _imaging C module is not installed

开发者 https://www.devze.com 2023-02-03 07:52 出处:网络
How to resize an image with python 2.4 ver开发者_Python百科sion.I am trying t make it a thumbnail

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 !

0

精彩评论

暂无评论...
验证码 换一张
取 消