An answer using PIL (just in case it’s useful).
given a numpy array “A”:
from PIL import Image
im = Image.fromarray(A)
im.save("your_file.jpeg")
you can replace “jpeg” with almost any format you want. More details about the formats here
More Related Contents:
- How to convert a PIL Image into a numpy array?
- How do I convert a numpy array to (and display) an image?
- scipy: savefig without frames, axes, only content
- how to convert an RGB image to numpy array?
- How do I convert a PIL Image into a NumPy array?
- Numpy Resize/Rescale Image
- Get coordinates of local maxima in 2D array above certain value
- Python OpenCV2 (cv2) wrapper to get image size?
- Combine 3 separate numpy arrays to an RGB image in Python
- FFT-based 2D convolution and correlation in Python
- Convert array dictionary to a dictionary python
- How do I get indices of N maximum values in a NumPy array?
- How to remove specific elements in a numpy array
- python numpy/scipy curve fitting
- Using Numpy Vectorize on Functions that Return Vectors
- how to handle an asymptote/discontinuity with Matplotlib
- Why is numpy.array so slow?
- Numpy individual element access slower than for lists
- How to turn a video into numpy array?
- AttributeError: ‘numpy.float64’ object has no attribute ‘log10’
- Why does numpy std() give a different result to matlab std()?
- generalized cumulative functions in NumPy/SciPy?
- Function to determine if two numbers are nearly equal when rounded to n significant decimal digits
- Installing lapack for numpy
- Adding colors to a 3d quiver plot in matplotlib
- Why is B = numpy.dot(A,x) so much slower looping through doing B[i,:,:] = numpy.dot(A[i,:,:],x) )?
- Understanding NumPy’s Convolve
- How can I serialize a numpy array while preserving matrix dimensions?
- Concatenate two numpy arrays in the 4th dimension
- How to get unix timestamp from numpy.datetime64