Re: [Image-SIG] Quantization of PNG images

2009-05-18 Thread Fredrik Lundh
On Mon, May 18, 2009 at 1:10 PM, Fredrik Lundh wrote: > If you convert the image to mode "P" before you save it, you get a > fixed 8-bit palette by default (based on "web safe colors").  To have > PIL pick an "optimal" palette instead, use convert("P", > palette=Image.ADAPTIVE).  See > >    http:

Re: [Image-SIG] Quantization of PNG images

2009-05-18 Thread Fredrik Lundh
On Mon, May 18, 2009 at 10:15 AM, Jesper Larsen wrote: > I am producing some png images for a web application. Some of the > images are cached and reused for other requests. I am using matplotlib > to produce the images. Unfortunately the images are quite large (up to > ~300 kb). I therefore trie