1from PIL import Image
2
3#read the image
4im = Image.open("sample-image.png")
5
6#show image
7im.show()
1import matplotlib.pyplot as plt
2import matplotlib.image as mpimg
3img = mpimg.imread('your_image.png')
4imgplot = plt.imshow(img)
5plt.show()
6
1from PIL import Image, ImageFilter # importing the image
2
3#Image -1 DLC3 with Blur filter
4img1 = Image.open('dlc3.jpg')
5filtered_img1 = img1.filter(ImageFilter.BLUR)
6filtered_img1.save('Blurdlc3.png')
7
8#Image -2 DYONISOS with Smooth filter
9img2 = Image.open('dyonisos.jpg')
10filtered_img2 = img2.filter(ImageFilter.SMOOTH)
11filtered_img2.save('dyonisossmooth.png')
12
13#Image - 3 SHARK with convert and rotate properties
14img3 = Image.open('shark.jpg')
15filtered_img3 = img3.convert('L')
16filtered_img3.rotate(180)
17filtered_img3.save('Shark.jpg')