[Image-SIG] Need help installing PIL 1.1.5 on OSX (LONG)
Bob Ippolito
bob at redivi.com
Fri Sep 22 21:00:55 CEST 2006
On 9/22/06, Jack Wu <wulabs at gmail.com> wrote:
> Wow Bob,
>
> Good suggestion. The application I'm using is Engal on Turbogears, a
> prototype photosharing web app. The JPEG photos now load correctly.
>
> The Gif images do not, and I get a "IOError: cannot write mode P as
> JPEG", but I will leave that to another thread after I do some
> dissecting.
You need to convert images that aren't already RGB in order to save
them as JPEG. This might be a bug in Engal, but the fix would look
something like this:
if image.mode != "RGB":
image = image.convert("RGB")
-bob
More information about the Image-SIG
mailing list