LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 08-31-2014, 02:39 AM   #1
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 108

Rep: Reputation: 17
Question 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
 
Old 08-31-2014, 07:07 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
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
 
Old 08-31-2014, 08:48 PM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
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.
Old 09-01-2014, 03:18 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,746
Blog Entries: 9

Rep: Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467
"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].
 
Old 09-06-2014, 10:31 AM   #5
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 108

Original Poster
Rep: Reputation: 17
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.
 
Old 09-06-2014, 07:38 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 12,746
Blog Entries: 9

Rep: Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467Reputation: 3467
sounds like you're on the path to unix nirvana...

glad it worked out. always satisfying.
 
Old 09-08-2014, 12:37 AM   #7
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 108

Original Poster
Rep: Reputation: 17
As someone who worked on mainframes last century I believe in O'Toole's law rather than unix nirvana.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xsane reduces size of image of scanned page - how to get back to full size? taylorkh Linux - Software 7 11-12-2010 05:37 PM
Extended a LV size, but df shows orig size, using DEBIAN ETCH, on a AMD64 hector3rd Linux - Newbie 8 04-23-2008 06:36 AM
Gnome pictures screensaver changing image size ziggy25 Linux - Software 2 02-23-2008 02:07 PM
selecting OS greenlinux Mandriva 2 08-30-2004 06:32 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration