[Zope] PIL error: decoder jpeg not available

dave@loewen.com dave@loewen.com
Thu, 19 Dec 2002 13:19:46 -0600


This is a multipart message in MIME format.
--=_alternative 006A284786256C94_=
Content-Type: text/plain; charset="us-ascii"

I'm desperately trying to get PIL going under Zope, so I can run the
Photo and Photo Folder products.

Everything seems to be working fine as long as I stick to .gif
images-- I can create a photo folder, add photo docs, pregenerate
thumbnails, etc.

However, it breaks when I try to use a .jpg image. When I try to
create a photo doc with a .jpg, I get the following error:

     *  Module PIL.Image, line 255, in _getdecoder
     IOError: decoder jpeg not available

OK, so i've searched all the lists I can find, and it seems as if i
don't have JPEG support compiled into PIL.

If I go to /var/zope/lib/python2.1/site-packages/PIL and run "ldd
_imaging.so", I get:

     libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
     /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

I believe I should have a line in there like "libjpeg.so.6 =>
/usr/lib/libjpeg.so.6". But I don't. So I believe this means that I
need to recompile the PIL libraries? I went back to my PIL /libImaging
folder and tried manually editing the ImConfig.h file. I uncommented
the line

     /* Define if you have the IJG jpeg library (-ljpeg).  */
     #undef HAVE_LIBJPEG */

then re-run make, but the new "_imaging.so" still doesn't seem to be
linked to libjpeg.so.6.

I think i'm close, but I can't quite get there. How do I recompile PIL
with JPG support? Sorry for being an idiot here, but can someone help
drag me the last 10 feet to victory?

--dave
--=_alternative 006A284786256C94_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="Courier New">I'm desperately trying to get PIL going under Zope, so I can run the<br>
Photo and Photo Folder products.<br>
<br>
Everything seems to be working fine as long as I stick to .gif<br>
images-- I can create a photo folder, add photo docs, pregenerate<br>
thumbnails, etc.<br>
<br>
However, it breaks when I try to use a .jpg image. When I try to<br>
create a photo doc with a .jpg, I get the following error:<br>
<br>
 &nbsp; &nbsp; * &nbsp;Module PIL.Image, line 255, in _getdecoder<br>
 &nbsp; &nbsp; IOError: decoder jpeg not available<br>
<br>
OK, so i've searched all the lists I can find, and it seems as if i<br>
don't have JPEG support compiled into PIL.<br>
<br>
If I go to /var/zope/lib/python2.1/site-packages/PIL and run &quot;ldd<br>
_imaging.so&quot;, I get:<br>
<br>
 &nbsp; &nbsp; libc.so.6 =&gt; /lib/i686/libc.so.6 (0x42000000)<br>
 &nbsp; &nbsp; /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x80000000)<br>
<br>
I believe I should have a line in there like &quot;libjpeg.so.6 =&gt;<br>
/usr/lib/libjpeg.so.6&quot;. But I don't. So I believe this means that I<br>
need to recompile the PIL libraries? I went back to my PIL /libImaging<br>
folder and tried manually editing the ImConfig.h file. I uncommented<br>
the line<br>
<br>
 &nbsp; &nbsp; /* Define if you have the IJG jpeg library (-ljpeg). &nbsp;*/<br>
 &nbsp; &nbsp; #undef HAVE_LIBJPEG */<br>
<br>
then re-run make, but the new &quot;_imaging.so&quot; still doesn't seem to be<br>
linked to libjpeg.so.6.<br>
<br>
I think i'm close, but I can't quite get there. How do I recompile PIL<br>
with JPG support? Sorry for being an idiot here, but can someone help<br>
drag me the last 10 feet to victory?<br>
<br>
--dave</font>
--=_alternative 006A284786256C94_=--