-2

I would like to show pictures in a very simple Python program.

Something like:

string imgLocation = "~/____.jpg";
print(imgLocation);

And it will show the picture

Its_707_not_LOL
  • 13
  • 1
  • 2
  • 7

1 Answers1

1

You need to use some library to show image, If you try to print any image via print command then it will just print pixel values.

For this, you can use matplotlib or Image library

Here it is a simple example using Image library from

How to display a jpg file in Python?

    import Image
    image = Image.open('File.jpg')
    image.show()
Pritish kumar
  • 512
  • 6
  • 13