I want to create a PIL image from a NumPy array. Here is my attempt:
However, the listing gives the following:
(255, 0, 0) (0, 0, 0) (0, 0, 0) (0, 0, 0)
And the saved image has a pure red color in the upper left corner, but all the other pixels are black. Why don't these other pixels retain the color that I assigned them in the NumPy array?
Thanks!
source share