The video compression (see the previous post) worked really well. It worked so well, in fact, that now my videos are much smaller, in total, than my photos.
Here we go again! Well, not exactly. You see, there is a much easier solution to batch-shrinking image files. It doesn't require any scripting at all.
- Warning! mogrify modifies files in place!
- Before you do this, make sure you have another copy of your image files. mogrify modifies the originals in place.
JPEG is a lossy format, and recompressing the files
will result in some loss of image quality. As an example of what can go wrong:
DON'T! $ mogrify -quality 7 *.jpg DON'T!would essentially destroy your originals.
Here are the steps for Ubuntu. Windows users, you are on your own for the installation.
- Install ImageMagick.
$ sudo apt-get install imagemagick
- cd to the directory with your images.
- Assuming JPEG format, type:
$ mogrify -quality 75 *.jpg
Wow, that was easy. I love Ubuntu!
For my images, which came from a Digital Elph, the re-compressed images take up less than half the space of the originals, and to me the images look just as good. Experiment with the quality setting and see what works best for you.