I’m working in Spyder with matplotlib.pyplot and want to save numpy array to images.
The documentation of imsave() says, that the format to which I can save depends on the backend. So what exactly is the backend? I seem to be able to save .tiff images, but f.e. I want them to be saved as 8-bit tiffs instead of RGB-Tiffs. Any Idea where I can change that?
I’m working in Spyder with matplotlib.pyplot and want to save numpy array to images.
Share
If you are trying to save an array as a tiff (with no axis markers ect) from mat, you might be better off using PIL.
(this assumes you are using
ipython --pylab, sorandis defined)write:
The
ravel()is important,putdataexpects a sequence (ie, 1D) not an array.read :
and the output file: