By Paras Rawat
A Python script for converting image files to thumbnail using the Image module of the PIL Library.
PIL is one of the most useful library to deal with image files. PIL library provides image processing capabilities.
1) Install pillow
" pip install pillow "
1) Import listdir from os and Image from PIL library respectively.
2) Get the location of the image file using the listdir module.
3) Create an image object.
4) Call the thumbnail method of the image object and pass the desired size for your thumbnail.
5) Save your thumbnail