Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-31-2014, 02:39 AM
|
#1
|
Member
Registered: Aug 2007
Location: Melbourne
Posts: 111
Rep:
|
selecting pictures by size
Does any one know of software that will let me either select all landscape orientated pics or by the pixel size e.g. any pic bigger than 1200x800
|
|
|
08-31-2014, 07:07 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,370
|
You can use the find command with the -size option to find all files a certain size or larger. So if you know how large a file is with 1200x800 pixels then you can use find to find all files that large or larger. See:
man find
-------------------------
Steve Stites
|
|
|
08-31-2014, 08:48 PM
|
#3
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,786
|
If you have imagemagik, you can use identify command like
Code:
cd /dir/of/png
for image in *.png; do
read w h <<<$(identify -format "%w %h" "$image")
if (( $w > 1200 && $h > 800)); then
echo $image
fi
done
Slow but it works
|
|
3 members found this post helpful.
|
09-01-2014, 03:18 AM
|
#4
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
"find" will only find file size, not image dimensions.
imagemagick is the way to go.
or, there certainly is some image viewer able to do something like that. check out geeqie and gthumb. esp. gthumb has plugins.
...and if your problem is solved, please mark your thread [solved].
|
|
|
09-06-2014, 10:31 AM
|
#5
|
Member
Registered: Aug 2007
Location: Melbourne
Posts: 111
Original Poster
Rep:
|
Thanks everyone. Using GIMP had taught me that size in bytes is not necessarily related to size in pixels. Identify works a treat and worst case scenario I can set it running before going to bed. Just had a massive learning experience with writing bash scripts to let me tidy up the file name while selecting by size in pixels.
|
|
|
09-06-2014, 07:38 PM
|
#6
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
sounds like you're on the path to unix nirvana...
glad it worked out. always satisfying.
|
|
|
09-08-2014, 12:37 AM
|
#7
|
Member
Registered: Aug 2007
Location: Melbourne
Posts: 111
Original Poster
Rep:
|
As someone who worked on mainframes last century I believe in O'Toole's law rather than unix nirvana.
|
|
|
All times are GMT -5. The time now is 01:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|