简体   繁体   English

调整Python图像大小,安装PIL

[英]Python image resizing, installing PIL

I want to do some image resizing with Python. 我想用Python调整图像大小。 I was trying to do it with the Python Image Library. 我试图用Python图像库来做到这一点。 Am I barking up the right tree? 我在叫正确的树吗?

I tried to install PIL on my Mac from this source http://www.pythonware.com/products/pil/ , but it has not been updated since 09. Is there something newer that I should look into? 我试图从此源http://www.pythonware.com/products/pil/在Mac上安装PIL,但自09年以来未对其进行更新。我应该研究一些较新的东西吗?

Installing it gives me an error: 安装它给我一个错误:

unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1

I tried installing the GCC but I think I have 4.2.1 我尝试安装GCC,但我认为我有4.2.1

Any help? 有什么帮助吗?

Yes PIL is the right Module. 是的,PIL是正确的模块。 but can also try ImageMagick 但也可以尝试ImageMagick

http://www.imagemagick.org/script/index.php http://www.imagemagick.org/script/index.php

No PIL 1.1.7 IS the LATEST, Nov 15th 2009 没有PIL 1.1.7是最新的,2009年11月15日

you can check this http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/ 您可以查看此http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/

PIL is the right module, PIL 1.1.7 might not be the version you want. PIL是正确的模块,PIL 1.1.7可能不是您想要的版本。 :-) :-)

In case the link from dilip kumbham doesn't work, a fork of PIL is available at http://pypi.python.org/pypi/Pillow 如果来自dilip kumbham的链接不起作用,可以在http://pypi.python.org/pypi/Pillow上获得PIL的分支。

That project is mostly about fixing packaging issues as far as I can tell, so it might be easier to install in general. 据我所知,该项目主要是解决包装问题,因此一般而言安装起来可能会更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM