[Pythonmac-SIG] PIL on Leopard
Ronald Oussoren
ronaldoussoren at mac.com
Wed Dec 19 20:10:22 CET 2007
On 19 Dec, 2007, at 7:05, Jamie Quint wrote:
> I am attempting to install PIL on Leopard from source, it all
> appears to be working, the build summary gives an all ok (see below)
The build process is a bit to lenient to my taste, it will automaticly
detect which C libraries are available and will adapt the build proces
to that. To build PIL with JPEG support you'll have to download and
install the jpeg libraries (http://www.ijg.org/).
Ronald
>
>
> jamiequint:/usr/src/Imaging- 1.1.6$ sudo python setup.py install
> running install
> running build
> running build_py
> running build_ext
> --- using frameworks at /System/Library/Frameworks
> --------------------------------------------------------------------
> PIL 1.1.6 BUILD SUMMARY
> --------------------------------------------------------------------
> version 1.1.6
> platform darwin 2.5.1 (r251:54863, Oct 5 2007, 21:08:09)
> [GCC 4.0.1 (Apple Inc. build 5465)]
> --------------------------------------------------------------------
> --- TKINTER support ok
> --- JPEG support ok
> --- ZLIB (PNG/ZIP) support ok
> --- FREETYPE2 support ok
> --------------------------------------------------------------------
> To check the build, run the selftest.py script.
> running build_scripts
> running install_lib
> creating /Library/Python/2.5/site-packages/PIL
> ...
>
>
> However, after this if I try to convert a jpg I get the following
> error (I can open the file and get info out of it, yet I cant save
> it).
>
>
> jamiequint:/Library/Python/2.5/site-packages$ python
> Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09)
> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Image
> >>> i = Image.open("/Users/jamiequint/Desktop/tag.jpg")
> >>> i.save("blah.png")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Library/Python/2.5/site-packages/PIL/Image.py", line 1372,
> in save
> self.load()
> File "/Library/Python/2.5/site-packages/PIL/ImageFile.py", line
> 180, in load
> d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
> File "/Library/Python/2.5/site-packages/PIL/Image.py", line 375,
> in _getdecoder
> raise IOError("decoder %s not available" % decoder_name)
> IOError: decoder jpeg not available
> >>> i.size
> (1321, 816)
> >>> i.format
> 'JPEG'
> >>> i.mode
> 'RGB'
>
>
> Any suggestions?
>
>
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
More information about the Pythonmac-SIG
mailing list