You are not logged in.
Hello,
I have a folder full of images I use as wallpapers. Now I need to sort them into widescreen and non-widescreen.
Is there some command-line app like 'find' that can search images and return all the ones which have a certain resolution/aspect ratio?
Thanks!
Offline
Maybe you should look into exiftool. It should, in combination with commandline magic, should be able to do what you need, I think.
Offline
Hello,
I have a folder full of images I use as wallpapers. Now I need to sort them into widescreen and non-widescreen.
Is there some command-line app like 'find' that can search images and return all the ones which have a certain resolution/aspect ratio?
Thanks!
You can try identify command, brought by the imagemagick package: http://www.imagemagick.org/script/identify.php
Last edited by RaisedFist (2009-07-31 07:29:10)
Offline
Oh, good idea, just tried!
That's enough for me, as I didn't really many different resolutions (and those are important enough, too)...:
for pic in $(ls *jpg); do echo mv \"$pic\" \"$(identify $pic | sed "s/$pic [^ ]* \([^ ]*\) .*/.\/\1\_$pic/")\"; done;
(I hate it: Need to set IFS to \n if file names contain white-spaces)
Offline
Oh, good idea, just tried!
That's enough for me, as I didn't really many different resolutions (and those are important enough, too)...:
for pic in $(ls *jpg); do echo mv \"$pic\" \"$(identify $pic | sed "s/$pic [^ ]* \([^ ]*\) .*/.\/\1\_$pic/")\"; done;
(I hate it: Need to set IFS to \n if file names contain white-spaces)
This, together with a few 'mv' commands, did it. Thanks
Offline