Ask coding questions

← Back to all posts
How to import an image onto python?
Moshiyakio (0)

Um...So I want to import an image onto python, but how do I do that? Please help, thank you.

Comments
hotnewtop
Mariano23 (1)

import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('your_image.png')
imgplot = plt.imshow(img)
plt.show()