I'd guess PNG won't get much smaller because you have a lot of different
colored pixels.  PNG compresses most when you have a sparser plot.  I'd
suggest that you try using JPG.  It will compress the multi-colored portion
of your plot way down.  You may see a few artifacts if you look carefully at
the axes: instead of pixels white,black,white you might get
white,grey,black,grey,white.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Einar M. Einarsson
> Sent: Monday, March 17, 2008 5:08 AM
> To: matplotlib-users@lists.sourceforge.net
> Subject: [Matplotlib-users] PNG filesize
> 
> 
> Hi all,
> 
> I'm trying to find ways to make the file-size of my PNG images smaller.
> 
> When I generate my 660*440px image I get a big 168kb file.
> (8bit RGB color model, has  an alpha channel (need that) but no
> interlacing scheme)
> 
> Here it is:
> http://metphys.org/eme/T05.png
> 
> I'm using the savefig method of-course.
> 
> 
> To see how much I could compress it I used pngcrush (the best tool
> according to the interwebs) and got it down to 128kb.
> 
> But thats still way to large for my intended use. (plotting results
> from an operational weather model, see. www.belgingur.is
> We are currently using IDL.)
> 
>  From what I've read about PNG files, which is supposed to be rather
> compact image format, it seems to me that the most effective way is
> to have an indexed color table.
> 
> So to cut it short:
> 
> Is there any way to save a PNG file with an indexed color table?
> 
> Or do you see any other way to shrink the files?
> 
> 
> Best regards.
> Einar M. Einarsson
> www.belgingur.is
> 
> -----------------------------------------------------------------------
> --
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to