You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [3]: from PIL import Image
In [5]: a = Image.open("images/spice_1.jpg")
In [7]: from io import BytesIO
In [9]: b = BytesIO()
In [10]: a.save(b, "PNG")
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-10-7850474bd2ff> in <module>()
----> 1 a.save(b, "PNG")
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/Image.pyc in save(self, fp, format, **params)
1669
1670 # may mutate self!
-> 1671 self.load()
1672
1673 save_all = False
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/ImageFile.pyc in load(self)
201
202 for d, e, o, a in self.tile:
--> 203 d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
204 seek(o)
205 try:
/home/ondrej/.hashdist/bld/profile/qiuivcebvrmc/lib/python2.7/site-packages/PIL/Image.pyc in _getdecoder(mode, decoder_name, args, extra)
418 return decoder(mode, *args + extra)
419 except AttributeError:
--> 420 raise IOError("decoder %s not available" % decoder_name)
421
422
IOError: decoder jpeg not available
But pillow has been installed with jpeg support, as part of Hashdist, here is the PR hashdist/hashstack#806, here is the build script:
Openjpeg is for JPEG2000 support, not plain old JPEG support. You nee libjpeg (of one form or another, plain, turbo, or other api compatible) + the headers, either as a -dev package or whatever your distro uses.
Here is how it is triggered:
But pillow has been installed with jpeg support, as part of Hashdist, here is the PR hashdist/hashstack#806, here is the build script:
You can see that the libraries are linked with jpeg support:
Here is the full build log: https://gist.github.com/certik/785890e6e72e2ac51669. The relevant part is perhaps:
So OPENJPEG is there. JPEG is not --- what does that mean? I thought OPENJPEG gives the JPEG support. Maybe that's the problem?
The text was updated successfully, but these errors were encountered: