[Image-SIG] problem decoding JPEG files on freshly built PIL 1.1.2 on BSD unix
by Eric Woudenberg other posts by this author
Jan 29 2002 4:40AM messages near this date
Re: [Image-SIG] Getting Image resolution ?
|
[Image-SIG] jpeglib.h (from jpeg-6b library)
Hi,
I'm using PIL 1.1.2 happily under Windows to produce thumbnails from
.gif and .jpeg files. The final app must run under BSDI4.0. I rebuilt
PIL from sources, also built Jpeg-6b and zlib-1.1.3. Everything built
and passed tests (PIL passed up to the point where the image was
trying to be displayed -- I don't have a screen on this machine):
mook:~/src/Imaging-1.1.2/libImaging $ make check
./coretest
> >> processing lena.ppm...
> >> elapsed time: 10
> >> as far as we tested, everything seems to be ok...
xv test.ppm
xv: Can't open display
*** Error code 1 (ignored)
But when I use it, I always get an error that it couldn't decode the file:
mook:~/src/Imaging-1.1.2/Images $ python
Python 2.2 (#5, Jan 27 2002, 22:13:28)
[GCC 2.7.2.1] on bsdos4
Type "help", "copyright", "credits" or "license" for more information.
> >> import Image
> >> a=Image.open('lena.jpg')
> >> a.getbbox()
Traceback (most recent call last):
File "<stdin> ", line 1, in ?
File "/home/minidisc/local/lib/python2.2/site-packages/PIL/Image.py", line 514, in getbbox
self.load()
File "/home/minidisc/local/lib/python2.2/site-packages/PIL/ImageFile.py", line 166, in loa
d
raise IOError, "decoder error %d when reading image file" % e
IOError: decoder error -2 when reading image file
> >>
Any ideas? My impression was that this should "just work", given that
it all works so nicely under windows.
The Jpeg decoder is being built in (from ImConfig.h):
/* Define if you have the IJG jpeg library (-ljpeg). */
#define HAVE_LIBJPEG 1
GIF files seem to work okay.
Thanks in advance for any help or suggestions.
Eric Woudenberg
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Eric Woudenberg
Terry Hancock
|