본문 바로가기
파이썬

파이썬 Python에서 jpg 파일을 표시하는 방법은 무엇입니까?

by º기록 2020. 10. 7.
반응형
def show():

    file = raw_input("What is the name of the image file? ")

    picture = Image(file)

    width, height = picture.size()

    pix = picture.getPixels()

이 이미지를 표시하는 코드를 작성하려고하는데이 코드는 이미지를 제공하지 않습니다. 이 이미지를 표시하기 위해 코드를 변경하는 방법은 무엇입니까?

 

해결 방법

 

from PIL import Image

image = Image.open('File.jpg')
image.show()

 

참조 페이지 https://stackoverflow.com/questions/5333244

 

 

반응형

댓글