how to crop a image using python (python pillow tutorial #3)

Published: 22 December 2020
on channel: Aaditya
1,105
12

hello, guys in this video I am gonna teach you how to crop an image using the python pillow library.


pillow tutorial playlist-   • pillow playlist  


Tkinter GUI playlist -    • tkinter tutorial  
Code -

#impoting pillow library
from PIL import Image
#opening a image
img = Image.open('aa79264f49aae4d4b2d77f0abdeb16fc.jpg')
getting the size of image
img_info = img.size
#printing image size
print(img_info)
showing image
img_s = img.show()
#croping image
img_crop= img.crop((100,30,300,300))
showing croped image
img_crp = img_crop.show()
#saving cropped Image
img_s = img_crop.save('lionface.jpg')


On this page of the site you can watch the video online how to crop a image using python (python pillow tutorial #3) with a duration of hours minute second in good quality, which was uploaded by the user Aaditya 22 December 2020, share the link with friends and acquaintances, this video has already been watched 1,105 times on youtube and it was liked by 12 viewers. Enjoy your viewing!