Added Image Compressor Script (#211)

* Added Readme.md

Gave a description of the project

* Added Image_Compressor 

Added image compressor script and a sample image to compress the image file to a reduced size.

* Updated README.md

Added my name in Contributors list.
This commit is contained in:
Prathima Kadari 2021-06-02 18:18:12 +05:30 committed by GitHub
parent 26a24c2891
commit 657ce07b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 0 deletions

BIN
Image_Compressor/Image.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -0,0 +1,12 @@
import PIL
from PIL import Image
from tkinter.filedialog import *
file_path=askopenfilenames()
img = PIL.Image.open(file_path)
myHeight,myWidth = img.size
img=img.resize((myHeight,myWidth),PIL.Image.ANTILIAS)
save_path=asksaveasfile()
img.save(save_path+"_compressed.JPG")

View File

@ -0,0 +1,11 @@
# Image_Compressor
This script compresses the image choosen to much reduced size. Image can be of any format.
Note : The image should be in same folder as the script
It will return with the compressed image when you compile.
It automates the task of compressing the image in day to day lives.
# Dependencies:
pip install image

View File

@ -173,6 +173,7 @@ So far, the following projects have been integrated to this repo:
|[Translate CLI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TranslateCLI)|[Rodrigo Oliveira](https://github.com/rodrigocam)| |[Translate CLI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/TranslateCLI)|[Rodrigo Oliveira](https://github.com/rodrigocam)|
|[Rock-Paper-Scissor Game](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Rock-Paper-Scissor)|[Punit Sakre](https://github.com/punitsakre23)| |[Rock-Paper-Scissor Game](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Rock-Paper-Scissor)|[Punit Sakre](https://github.com/punitsakre23)|
|[Folder Locker and hider](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Folder%20Locker%20%26%20Hider)|[Prajjwal Pathak](https://github.com/pyguru123)| |[Folder Locker and hider](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Folder%20Locker%20%26%20Hider)|[Prajjwal Pathak](https://github.com/pyguru123)|
|[Image Compressor](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image_Compressor)|[Prathima Kadari](https://github.com/prathimacode-hub)|
## How to use : ## How to use :