skip to Main Content

I am trying to open image with normal photo viewer but PIL module always opens up Photoshop to show image.

from PIL import Image
image1 = Image.open("images/dog_1.jpg")
image1.show()

2

Answers


  1. Looks like your default image viewer is set to Photoshop. Try changing to another app in your system settings. If you are on windows 10, then navigate to Settings > Apps > Default apps and change ‘Photo viewer’ app to the one you want.

    Login or Signup to reply.
  2. I would suggest you to use openCV instead.

    import cv2
    imagepath = 'images/dog_1.jpg'
    image = cv2.imread(imagepath)
    cv2.imshow('image', image) 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search