python - Create image with PIL `Image.fromarray` results in ...
stackoverflow.com › questions › 53969450Dec 29, 2018 · AttributeError: 'list' object has no attribute 'array_interface' You should do this instead: import numpy as np from PIL import Image # Create a NumPy array arry = np.array([[25, 25, 25], [0, 0, 0], [0, 0, 0]], dtype=np.uint8) # Create a PIL image from the NumPy array image = Image.fromarray(arry) # Save the image image.save('image.jpg')