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 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, for the file, is listed as 32 rather than the expected 8.

In the attached script, the DNs array represents a single-channel, gray-scale, luminosity image which is to be pseudo-colorized as discussed in the tutorial <http://matplotlib.sourceforge.net/users/image_tutorial.html>.

Can matplotlib be used to accomplish this? If so, could someone direct me to where this is discussed?

Thanks,
-- jv

Attachment: 8-bit PNGs.py
Description: application/python

------------------------------------------------------------------------------
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

Reply via email to