Skip to content

xVyrusz/Compress-Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub GitHub code size in bytes

1.- Instal virtualenv

pip install virtualenv

2.- Create a virtual environment

virtualenv --python=python3 venv

3.- Activate the virtual environment

  • cmd: call venv/Scripts/activate

4.- Install requeriments.txt

pip install -r requeriments.txt

You can change the name of the directorys

path  = os.path.join(cwd, 'COMPRESS_IMAGES') # Name the directory  where  will be created and saved the images
path_img =  os.path.join(cwd, 'IMAGES_BIRLOS') # Match the name of directory where are the images to compress

if you want the original name of the images just erase 'compressed-'

check_img = os.path.join(check, 'compressed-'+ img_name)

img.save('compressed-'+ img_name, optimize=True, quality=30)

Like this

check_img = os.path.join(check, img_name)

img.save(img_name, optimize=True, quality=30)

About

Script in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages