June 06, 2013 at 06:03AM
Now-a-days, we all have tons of photos. But when it comes to backup, many of us don’t have enough space to keep them all. One of the best method used to store large amount of Images is by “Compressing” it. And if you’re dealing with huge amount of Images, you don’t want to open each and every image in photo editor and optimize it according to your criteria.
The easiest way to do it in bulk is by compressing it using Command Prompt with just a single line.
For this you need to install Cygwin and during installation process, make sure to pick ImageMagick Package. After installing navigate to terminal window already set. Use cd command to switch,
You can use cd and Is command to see where you are, and navigate to the folder you want to manipulate. After you decided on which folder you are trying this method,
for f in *.jpg; do convert –quality 70 $f; done
However, some of you may feel this line of code as weird, but with this single line code you can compress the whole bulk of images contained in the folder. The “for” operator is used for listing all the files we defined as “*.jpg”, and then runs the convert command which is no other than ImageMagick to change the quality.
If you want different level of compression use any number instead of 70. But anything less than 70 is of low quality.
coverts –quality 70 imag.jpg image.jpg
In the last line of code, the first image name is the name of the image you want to open, and second is the name in which you want to save your file after the process.
Copyright © 2011-2012
This feed is intended only for the personal, non-commercial use and content is copyrighted to TechFeb.COM and may not be reproduced on other websites without permission.
from (title unknown) http://www.techfeb.com/how-to-compress-a-folder-of-bulk-images-easily-using-command-prompt/