PIL: IOError: encoder jpeg not available

I have got this error while doing this
import tempfile
bg_new=Image.new(‘RGB’,(486,236), GREEN)
tmp = tempfile.mktemp(suffix=’.%s’ % ‘jpg’)
bg_new.save(tmp, “JPEG”, quality=95)

I was looking for solution and got this:

in setup.py in Imaging-1.1.6 that is PIL 1.1.6
set this
JPEG_ROOT = “/usr/lib64”, “/usr/include”
then in terminal
python setup.py build –force
this will include libjpeg in PIL. before you may need to install libjpeg in your linux system. I have tried this with python2.4 in ubuntu 8.10
hope this works

Advertisements
About

Work is fun!

Tagged with: , , , , ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
June 2009
M T W T F S S
« May   Sep »
1234567
891011121314
15161718192021
22232425262728
2930  

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: