Saturday, 5 September 2009

JPEG and FREETYPE2 support for PIL on Ubuntu 9.04

I recently faced problem with jpeg support for PIL.
It might have happened because of some package updates in Ubuntu.
Any way, I realized this issue after I started to develop with Plone-3.3.

So, now, I abandoned PIL from using machine wide and started to describe "PIL" to buildout.cfg like:

eggs =
Plone
PIL
${buildout:eggs}
...

Before running ./bin/buildout -v, need to make sure that libraries for jpeg and freetype2 are installed.

$ sudo apt-get install libjpeg62-dev
$ sudo apt-get install libfreetype6-dev

Now by running ./bin/buildout -v, you can see this summary:

$ ./bin/buildout -v
...

PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version 1.1.6
platform linux2 2.4.6 (#2, Mar 19 2009, 10:02:47)
[GCC 4.3.3]
--------------------------------------------------------------------
*** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
...