from PIL import Image
visa_file='/content/visa-logo-mastercard.jpg'
img_visa= Image.open(visa_file,mode='r')
img_visa.show()我不会在Google中得到图像的输出。
type(img_visa)的输出也是'PIL.JpegImagePlugin.JpegImageFile'.
因此,图像对象已经创建,但图像没有显示。我只想用PIL来显示图像。怎么做?
发布于 2020-05-28 18:13:25
只是
img_visa就够了。你不需要
img_visa.show()更明确的是,您可以使用
display(img_visa)https://stackoverflow.com/questions/62046864
复制相似问题