[IMAGE-SIG] Decoding Jpegs

Fredrik Lundh fredrik@pythonware.com
Sun, 1 Feb 1998 18:23:21 +0100


>Does this mean I have incorrectly installed the jpeg libarary or
>is the image library incompatible with Python 1.5?

AFAIK, it works just fine with 1.5; it's probably some configuration
problem.  Here's the quickest way to get PIL up and running under
RedHat 4.2 (and 5.0):

RedHat includes libz and libjpeg (in /usr/lib), so you don't need
to build them yourself. However, the 0.3a1 source kit assumes
that you have libjpeg 6.0 while RedHat ships with 6.0a.  To use
these libs anyway, do as follows:

1. goto libImaging and run configure as usual.

2. before you build the library, edit the ImConfig.h file so
that jpeg is enabled:

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

3. compile the library and look for warnings in the JpegEncode.c and
   JpegDecode.c files.  if you don't get any warnings, take another look
   at the ImConfig.h file, and make sure you don't have any other jpeg
   library on the machine (at least not in the linker library path)

4. change the METHODDEF and GLOBAL references in JpegEncode.c
   and JpegDecode.c from "METHODDEF int" to "METHODDEF(int)" etc.
   compile again, and make sure you don't get any warnings from
   these two modules.

4. when you have built the library, go back to the module library
   and copy Setup.in to Setup.  edit the latter so that libz and libjpeg
   are taken from /usr/lib.

you can also wait a day or two for the 0.3b1 source kit (which is
what I'm working on at this very moment, on a RedHat 4.2 box).

Cheers /F


_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________