This is how I got it to work.
- Install lib jpeg using homebrew (which is super-aweseome!)
brew intall jpeg.This installs the library into
- Install libfreetype the old-fashioned way (./configure, make, sudo make install). I used freetype-2.1.10.pre-20050511.
- Download, unpack PIL (I used Imaging-1.1.6). I had to make the following changes to setup.py
FREETYPE_ROOT = "/usr/local"
JPEG_ROOT = ("/usr/local/Cellar/jpeg/7/lib", "/usr/local/Cellar/jpeg/7/include")
- Then, build PIL:
python setup.py build_ext -i
- If the build works without any errors, you can run the tests:
python selftest.pywhich should yield the following: 57 tests passed.
- (optional) I like to use virtualenv, so I activate that:
- Install PIL:
python setup.py install
comments powered by Disqus
im = Image.open("/path/to/pretty/picture.jpg")