Post

PythonPython

T
Tom 234

Posted on 23rd April 2024|10 views

0
votes

Python Display Image

How to display an image with python?

I want to display an image by utilizing IPython.display like this

from IPython.display import display, Image display(Image(filename='My_Image.png'))

 

Answers
P
Altaf syed

Posted on 23rd April 2024

You can use this in a simpler way

from PIL import Image 

image = Image.open('My_image.jpg') 

image.show()

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos