Compress Images

The purpose of this script is to compress a lots of images on linux and save them in a zip folder. This script use "convert" to compress the images.

How to use it ?

Download the script, extract it, set +x and copy it in /usr/bin.
$ tar xfv compress-image_v2.1.tar.gz
# chmod +x compress-image_v2.1
# mv compress-image_v2.1 /usr/bin/compress-image

Now you can use the script writing "compress-image" in you terminal.
$ compress-image
Usage: ./compress-image [dir] [quality] [output file name] [format]
[dir] directory which contains the images
[quality] compression level 0-100
[output file name] create a zip folder in /home/fred
[format] default .jpg, .JPG

$ ./compress-image /home/fred/Pictures/holiday-2011 50 holiday
All images .jpg and .JPG under the dir "/home/fred/Pictures/holiday-2011" will be compressed at 50% and saved in /home/fred/



Date: 03 Dicember 2011 18:00