How do I batch-downsize images on linux, while keeping small images small?
Posted
by
Gabriel
on Super User
See other posts from Super User
or by Gabriel
Published on 2014-08-22T15:23:40Z
Indexed on
2014/08/22
16:27 UTC
Read the original article
Hit count: 274
I have a whole lot of photos and it's time to clean up the mess and free some disk space. I know mogrify is great to batch-resize things down. The problem is, in some directories I have small images mixed with the big ones. I'd like to batch-downsize all the big one but not upsize the small ones.
As an example, I have a rep with tens of MBs-pictures in the 3000x2000s. Some of them I have already downsized so I could email them. They may be 1024x768. I'd like to downsize the big ones to 1600x1200, a disk-space-to-quality tradeoff I like. But then, with mogrify
or convert
, the small ones will be upsized, which would be a waste of disk space.
I found some tricky ways to use identify
with cut
and some scripting to filter the small pics out and mogrify the others, but man, there's got a way to tell mogrify not to upsize my pics... How ?
Is there some other tool better suited ?
© Super User or respective owner