I have an image stored in a numpy array that I want to convert to PIL.Image
in order to perform an interpolation only available with PIL.
When trying to convert it through Image.fromarray()
it raises the following error:
TypeError: Cannot handle this data type
I have read the answers here and here but they do not seem to help in my situation.
What I'm trying to run:
from PIL import Image
x # a numpy array representing an image, shape: (256, 256, 3)
Image.fromarray(x)