Ask coding questions
Um...So I want to import an image onto python, but how do I do that? Please help, thank you.
import matplotlib.pyplot as pltimport matplotlib.image as mpimgimg = mpimg.imread('your_image.png')imgplot = plt.imshow(img)plt.show()
try using PIL
PIL
https://pillow.readthedocs.io/en/stable/reference/Image.html
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()