Page History
...
Code Block |
---|
np.savetxt(fname, array) # , fmt='%f') np.save(fname, array) np.savez(fname, [array1, array2,...]) |
Save image in 8-bit TIFF file
Code Block | ||
---|---|---|
| ||
import scipy.misc as scim scim.imsave('fname.tiff', arr2d) |
Other supported formats: gif, pdf, png, jpeg, eps
Save image in 16-bit TIFF file
Code Block | ||
---|---|---|
| ||
import Image
img = Image.fromarray(arr.astype(np.int16)) # or int32
img.save('fname.tiff') |
Read image from TIFF file
...
Overview
Content Tools