Hi.

I'm new to the PIL library and having problems while converting 24
bits png to gif. While the conversion works fine from an image quality
perspective, the resultant gif image size is very large. Much larger
than the original 24 bit png! Carrying out the same conversion in
other image programs (irfanview, gimp) produces an image of about a
quarter of the size as my code.

I use the following code to carry out the conversion.

img = Image.open(self.input)
img = img.convert('RGB').convert('P', palette=Image.ADAPTIVE)
img.save(self.output,"gif")

I use an adaptive palette since I'm converting maps and dithering
reduces the quality.

Any tips/suggestions are welcome.

Kind regards

Tom

-- 
Tom Blackmore
www.arctictiger.se

Västerkvarnsvägen 7,
73493 Kolbäck
Tfn. 073-8413456
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to