Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-23 Thread Christopher Barker
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 anothe

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-23 Thread j vickroy
Eric Firing wrote: You can post-process the image with something like ImageMagick. Another alternative is to use PIL -- you can grab the matplotlib buffer, make a PIL image out of it, and use PIL to convert to an 8-bit palleted image. For that matter, you could probably bypass MPL, and use nump

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Eric Firing
>> You can post-process the image with something like ImageMagick. >> >> Another alternative is to use PIL -- you can grab the matplotlib buffer, >> make a PIL image out of it, and use PIL to convert to an 8-bit palleted >> image. >> >> For that matter, you could probably bypass MPL, and use numpy

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Eric Firing
On 07/22/2010 03:40 PM, j vickroy wrote: > Christopher Barker wrote: >> Jim Vickroy wrote: >> >>> The attachment is a simple script that creates a 2D array of unsigned, >>> 8-bit integers and uses matplotlib to save it as a PNG file. >>> >>> Unfortunately, the PNG file is much larger than expected

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread j vickroy
Christopher Barker wrote: Jim Vickroy wrote: The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses matplotlib to save it as a PNG file. Unfortunately, the PNG file is much larger than expected -- apparently because it is True-Color; on my MS Windows

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Christopher Barker
Jim Vickroy wrote: > The attachment is a simple script that creates a 2D array of unsigned, > 8-bit integers and uses matplotlib to save it as a PNG file. > > Unfortunately, the PNG file is much larger than expected -- apparently > because it is True-Color; on my MS Windows machine, bit depth, f

[Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Jim Vickroy
Hello, Apologies for reposting my question from yesterday ("save image as color-mapped 8-bit rather than true-color"). I am hoping this reposting clarifies what I am trying to accomplish. The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses matplot