Re: Convert all images to JPEG

2004-12-29 Thread Fredrik Lundh
"Thomas" <[EMAIL PROTECTED]> wrote: > I got a bunch of different images of different types ( bmp, gif, png, > tiff etc ) and I want to convert them all to JPEGs using PIL. Is this > possible? When I try I get all sorts of errors, doing something like : > > im = Image.open(srcImage) # might be png,

Re: Convert all images to JPEG

2004-12-28 Thread Leif K-Brooks
Thomas wrote: im = Image.open(srcImage) # might be png, gif etc, for instance test1.png im.thumbnail(size, Image.ANTIALIAS) # size is 640x480 im.save(targetName, "JPEG") # targetname is test1.jpg produces an exception. Any clues? The problem is that test1.png is a paletted image, and JPEGs can only