j vickroy wrote: > Thanks much for this information and also for taking the additional time > to try the optipng tool. It is very helpful. > > Since the above mentioned PNG generation is one step in a "near" > real-time products generation system, I was hoping to avoid the addition > of another component (i.e., PNG compression) in the stream, but it > appears unavoidable.
yes, but you can build it into your python script. I'm sorry I don't have time to write a sample for you, but: You can get the RGBA buffer from MPL You can convert that to a PIL RGBA image. You can use PIL's "quantize" method to make a palletted image. You can save that palleted image as a PNG. I think that will all run pretty fast. By the way, I'm pretty sure there are a few functions in MPL already that use PIL if it is installed -- so if you get this working, it may be worth adding to MPL -- or maybe not, it's pretty specialized. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users