LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 01:39 AM   #1
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 111

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, 06:07 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
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, 07:48 PM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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, 02:18 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
"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, 09:31 AM   #5
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 111

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, 06:38 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

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

glad it worked out. always satisfying.
 
Old 09-07-2014, 11:37 PM   #7
nyloc
Member
 
Registered: Aug 2007
Location: Melbourne
Posts: 111

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



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 04:37 PM
Extended a LV size, but df shows orig size, using DEBIAN ETCH, on a AMD64 hector3rd Linux - Newbie 8 04-23-2008 05:36 AM
Gnome pictures screensaver changing image size ziggy25 Linux - Software 2 02-23-2008 01:07 PM
selecting OS greenlinux Mandriva 2 08-30-2004 05:32 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM

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

All times are GMT -5. The time now is 08:42 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
Open Source Consulting | Domain Registration