Hi all,
I tried to read a jpg file.
How can fix the following problem ?
File "test.py", line 15, in <module>
im = imshow(lena, origin='lower')
File "/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 1915, in imshow
ret = gca().imshow(*args, **kwargs)
File "/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/axes.py", line 5498, in imshow
im.set_data(X)
File "/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", line 282, in set_data
self._A = pil_to_array(A)
File "/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", line 751, in pil_to_array
x = toarray(im)
File "/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", line 736, in toarray
x_str = im.tostring('raw',im.mode,0,-1)
File "/data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py", line 513, in tostring
self.load()
File "/data/home/nwagner/local/lib/python2.5/site-packages/PIL/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
Is it possible to plot different jpg's in subplots ?
Nils
Nils Wagner schrieb:
Hi all,
I tried to read a jpg file.
How can fix the following problem ?
Which operating system are you using?
The problem arise in the PIL (Python Imaging Library). It cannot find the libjpeg library (you have it installed on your system?). Try to install libjpeg and properly configure/install PIL.
Gregor
Centos4.6 (Linux)
libjpeg.rpm is installed.
rpm -ql libjpeg
/usr/bin/cjpeg
/usr/bin/djpeg
/usr/bin/jpegtran
/usr/bin/rdjpgcom
/usr/bin/wrjpgcom
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0
/usr/share/doc/libjpeg-6b
/usr/share/doc/libjpeg-6b/README
/usr/share/doc/libjpeg-6b/usage.doc
/usr/share/man/man1/cjpeg.1.gz
/usr/share/man/man1/djpeg.1.gz
/usr/share/man/man1/jpegtran.1.gz
/usr/share/man/man1/rdjpgcom.1.gz
/usr/share/man/man1/wrjpgcom.1.gz
/usr/bin/cjpeg
/usr/bin/djpeg
/usr/bin/jpegtran
/usr/bin/rdjpgcom
/usr/bin/wrjpgcom
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.0.0
/usr/share/doc/libjpeg-6b
/usr/share/doc/libjpeg-6b/README
/usr/share/doc/libjpeg-6b/usage.doc
/usr/share/man/man1/cjpeg.1.gz
/usr/share/man/man1/djpeg.1.gz
/usr/share/man/man1/jpegtran.1.gz
/usr/share/man/man1/rdjpgcom.1.gz
/usr/share/man/man1/wrjpgcom.1.gz
Any idea ?
Nils
···
On Thu, 06 Nov 2008 13:28:21 +0100 Gregor Thalhammer <gregor.thalhammer@...287...> wrote:
Nils Wagner schrieb:
Hi all,
I tried to read a jpg file.
How can fix the following problem ?
Which operating system are you using?
The problem arise in the PIL (Python Imaging Library). It cannot find the libjpeg library (you have it installed on your system?). Try to install libjpeg and properly configure/install PIL.
Gregor
Nils Wagner wrote:
I tried to read a jpg file.
How can fix the following problem ?
Centos4.6 (Linux)
libjpeg.rpm is installed.
How do did you build/install PIL? It may not have found libjpeg when it was built, in which case it wouldn't support jpegs.
Is it possible to combine jpegs with matplotlib or PIL ?
I don't know what you mean by "combine", but PILL can probably do it, once you get jpeg support working.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@...259...