PIL安装 - 部分JPEG支持

时间:2014-07-06 22:02:20

标签: python macos jpeg python-imaging-library

尝试在Mac OS X上使用PIL作为图像绘制脚本。

安装了所有必需的库,运行' python setup.py build_ext -i'测试和JPEG显示为'支持可用':

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      darwin 2.7.5 (default, Mar  9 2014, 22:15:05)
              [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
--------------------------------------------------------------------

然而,运行' python selftest.py'虽然显示为'不支持':

PIL 1.1.7 TEST SUMMARY 
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
--- TKINTER support ok
*** JPEG support not installed
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--- LITTLECMS support ok
--------------------------------------------------------------------
Running selftest:
*****************************************************************
Failure in example:
try:
 _info(Image.open(os.path.join(ROOT, "Images/lena.jpg")))
except IOError, v:
 print v
from line #24 of selftest.testimage
Expected: ('JPEG', 'RGB', (128, 128))
Got: decoder jpeg not available
1 items had failures:
   1 of  57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.

重新安装libjpeg和pil没有任何效果。

0 个答案:

没有答案