Tampilkan gambar dalam Python
from PIL import Image
#read the image
im = Image.open("sample-image.png")
#show image
im.show()
Lively Lark
from PIL import Image
#read the image
im = Image.open("sample-image.png")
#show image
im.show()
# Import required libraries
from matplotlib import pyplot as plt
from matplotlib import image as mpimg
plt.title('GradCAM Bee Image') # Adds title
plt.xlabel('X pixel scaling') # Adds X label
plt.ylabel('Y pixels scaling') # Adds y label
im = mpimg.imread('GradCAM_Bee.png') # Reads the image
plt.imshow(im)
plt.show()
from IPython import display
display.Image("path_to_image/image_name.jpg")
# importing Image class from PIL package
from PIL import Image
# creating a object
im = Image.open(r"C:\Users\System-Pc\Desktop\home.png")
im.show()