To compress the size of the image without changing the dimensions
- Here using the Image module of PIL library we convert the size the image without changing the dimension of the image the reduced image will be there in the same folder as of the script. -Here we can also change the size of the image if we wanted by mentioning it in the script.
- List out the libraries imported>PIL(pillow)
Here take the image which you wanted to reduce the size in the same folder as of script then run the script so the output reduced image will be there as output.
First install the library then run the script so the reduced size image will be there as output in the same folder as of script.
Neel Shah