Hello all,
I use IM irregularly so I'm not fully aware of all its functionalities.
Is it possible to use it to search for images (in a directory) with certain characteristics. For instance to list all the images of type tif that have more than 20 Mpix ? This could be done by doing "find -name \*.tif | identify -format ... | sort ..." but maybe there are faster and better ways to do it...
But first I don't know what kind of -format will give me a MPix value and second this is extremely slow.
Searching for specific images with IM
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Searching for specific images with IM
dargaud wrote:Hello all,
I use IM irregularly so I'm not fully aware of all its functionalities.
Is it possible to use it to search for images (in a directory) with certain characteristics. For instance to list all the images of type tif that have more than 20 Mpix ? This could be done by doing "find -name \*.tif | identify -format ... | sort ..." but maybe there are faster and better ways to do it...
But first I don't know what kind of -format will give me a MPix value and second this is extremely slow.
See %b at http://www.imagemagick.org/script/escape.php for the file size
See -ping option to make identify -format faster http://www.imagemagick.org/Usage/basics/#controls
But I think your best bet is to stick with shell programming. You should be able to get the file size from ls-al. But I am no expert on these matters.