Skip to content Skip to sidebar Skip to footer

How To Open An Image In Python 3.7?

How do I open an Image in Python 3.7? I tried: 1.Import Image Image.open('File_name.jpg') Error received: ImportError: No module named 'Image' Import cv2 image = cv2.imread('backr

Solution 1:

there are many libraries made for theses cases

so i'll explain pillow

first you need to install it you can use pip : pip install Pillow

or easy install : easy_install Pillow

from PIL import Image
im = Image.open(".../path_of_the_image/name.jpg")
im.show()

for more details you can visit the official documentation here

Post a Comment for "How To Open An Image In Python 3.7?"