0

如何使用 python 2.4 版本调整图像大小。我正在尝试将其设为缩略图

我已经下载了 PIL 库,但面临与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")

4

1 回答 1

1

我认为这是同一个问题:PIL 错误:未安装 _imaging C 模块

我希望它能解决你的问题!

于 2011-01-06T11:29:55.373 回答