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

Publié le: 22 décembre 2020
sur la chaîne: 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')


Sur cette page du site, vous pouvez voir la vidéo en ligne how to crop a image using python (python pillow tutorial #3) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Aaditya 22 décembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,105 fois et il a aimé 12 téléspectateurs. Bon visionnage!