简体   繁体   中英

python PIL using Photoshop to open Image

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()

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.

I would suggest you to use openCV instead.

import cv2
imagepath = 'images/dog_1.jpg'
image = cv2.imread(imagepath)
cv2.imshow('image', image) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM