Bob Ippolito wrote:

> 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")

I'd recommend

     if image.mode not in ("L", "RGB"):
         image = image.convert("RGB")

or even, to do the "right thing" for all possible modes:

     if image.mode not in ("L", "RGB"):
         image = image.convert(Image.getmodebase(image.mode))

</F>

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to