[Baypiggies] Resizing an image?
Ned Deily
nad at acm.org
Tue Feb 16 22:40:12 CET 2010
In article <4B7B0038.4090806 at ulmcnett.com>,
Paul McNett <p at ulmcnett.com> wrote:
> On 2/16/10 12:16 PM, Ted Nyman wrote:
> > Getting PIL to work on OS X is notoriously problematic. Have you checked
> > out this SO post?
> >
> > http://stackoverflow.com/questions/1438270/installing-python-imaging-library
> > -pil-on-snow-leopard-with-updated-python-2-6-2
>
> Thanks for that link. I've filed it for further review. I'm currently still
> on
> plain-old-leopard though, as most of my clients are too and I'm afraid that
> if I
> start building my apps on SL, there will be problems distributing to L. But
> maybe the
> solution in this article would work for 2.5, too.
If you need to install PIL for a particular OS X system and python
version, the simplest way by far is to install everything from MacPorts:
# download and install base MacPorts infrastructure if necessary, then:
sudo port selfupdate # ensure port files are up-to-date
sudo port install py25-pil
(or sudo port install py26-pil)
That will build and install the appropriate python, PIL, and any
necessary dependent libraries which is the tricky part. You can also
just use MacPorts to install the libraries (freetype, jpeg, et al) and
do a source install of PIL to an existing Python, either an
Apple-supplied one or a python.org installer one, but you do need to be
careful to build the necessary missing libraries with all of the
appropriate architectures. The easiest way to do that is add +universal
to variants.conf in /opt/local/etc/macports before installing.
If you are building an app for distribution to a mix of OS X systems,
you should definitely stick to building on 10.5 rather than 10.6 for the
time being if you can, especially if you are using py2app. There are
still many more potential gotchas on 10.6, primarily as a result of the
move to 64-bit as default. You can make it work and, over time, the
rough edges will get fixed but, for now, sticking with 10.5 will
undoubtedly be easier.
--
Ned Deily,
nad at acm.org
More information about the Baypiggies
mailing list