This is an archival dump of old wiki content --- see scipy.org for current material.
Please see http://scipy-cookbook.readthedocs.org/

Image processing often works on gray scale images that were stored as PNG files. How do we import / export that file into python?

This permits to do some processing for further exporting such as for converting a matrix to a raster image. In the newest version of pylab (check that your pylab.matplotlib.__version__ is superior to '0.98.0') you get directly a 2D numpy array if the image is grayscale.


CategoryCookbookMatplotlib

SciPy: Cookbook/Matplotlib/LoadImage (last edited 2015-10-24 17:48:24 by anonymous)