Sunday, 8 November 2015

script to compress any photo format

Writter: Anuj Borah

script that will compress any photo with any format like .jpeg , .jpg , .png etc up to 100% . say if you have a picture of 3 mb , with this script you can compress it till 1 kb . with no degradation of quality.

su -c 'yum install ImageMagick'

echo 'please provide the location of image file 'example ---  /home/anuj/image/anuj.jpg''
read a
echo 'please let me know how much percentage you want to compress -- 'ex- like 50%  etc''
read b
convert $a -resize $b image_new0.jpg
echo 'if you want to compress more photo , run this script again'
echo ":) . Thanks have a nice day !! see u on facebook `firefox`"

Popular Posts