Converting 2D Numpy array of grayscale values to a PIL image
I think the answer is wrong. The Image.fromarray( ____ , ‘L’) function seems to only work properly with an array of integers between 0 and 255. I use the np.uint8 function for this. You can see this demonstrated if you try to make a gradient. import numpy as np from PIL import Image # gradient … Read more