from PIL import Image from numpy import asarray img = Image.open('Sample.png') numpydata = asarray(img) print(type(numpydata)) print(numpydata.shape)