If Pillow library is not installed, then first install it using this code.
pip install Pillow
The image should be in the same folder in which the code file is running. Otherwise, add the location before the image name.
# Import the PIL library from PIL import Image # Read the Image image = Image.open("man.jpg") # Show the Image image.show() # Print type of Image print(type(image))