Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
|
|
11-06-2009, 11:51 PM
|
#1
|
Member
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142
Rep:
|
sorting images by dimension in Fedora 11
My Friends,
Please excuse me if it seems like I'm wasting your time, but I'd like to take a second to thank you all for your support and patience during my transition to linux. I couldn't have done it without this forum.
Anyway, what I'm looking to do is rather simple, and I'm embarrassed I need to ask which program to use to do this. I run KDE and dolphin doesn't give me any options in folders full of images to sort by dimension. I just want to skim out all the ones that are 1280 by 1024 or larger. Is there a command for this?
|
|
|
11-07-2009, 01:20 AM
|
#2
|
Senior Member
Registered: Aug 2006
Posts: 2,697
|
you can see here for similar example, change the values as needed
|
|
|
11-13-2009, 09:17 PM
|
#3
|
Member
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142
Original Poster
Rep:
|
I appreciate your help, but this didn't work for me. I copied the command, put in the appropriate directory, and hit enter but nothing happened. I also don't know what the appropriate command would be as I don't want to resiwe them, just move them if they're over a certain size.
|
|
|
11-13-2009, 09:31 PM
|
#4
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,667
|
that full script is for RESIZING images using imagemagick
the part ghostdog74 is talking about is
Code:
if ( arr[1] > 200 && arr[2] > 200 ) {
part where 200 is the image size
you need to wright your own script to select images bigger than 1024
PS. DO NOT GO AROUND AND RUN RANDOM SCRIPTS posted by people one of them just might have you deleting your OS like this "rm -f / "
Last edited by John VV; 11-13-2009 at 09:34 PM.
|
|
|
11-13-2009, 09:44 PM
|
#5
|
Senior Member
Registered: Aug 2006
Posts: 2,697
|
Quote:
Originally Posted by thezerodragon
I appreciate your help, but this didn't work for me. I copied the command, put in the appropriate directory, and hit enter but nothing happened. I also don't know what the appropriate command would be as I don't want to resiwe them, just move them if they're over a certain size.
|
i said its similar, i did not say its exactly what you want. you just want to skim out the dimensions right? so the if() statement does just that. change the values as needed. if you want to move them, just do
Code:
if ( ... ) {
cmd = "mv "$1" /destination"
system(cmd)
}
|
|
|
11-13-2009, 09:45 PM
|
#6
|
Senior Member
Registered: Aug 2006
Posts: 2,697
|
Quote:
Originally Posted by John VV
PS. DO NOT GO AROUND AND RUN RANDOM SCRIPTS posted by people one of them just might have you deleting your OS like this "rm -f / "
|
only if they have the naive assumption that everything works exactly if they cut and paste, and are too lazy to read the source code and understand what it does.
|
|
|
11-13-2009, 10:57 PM
|
#8
|
Senior Member
Registered: Aug 2006
Posts: 2,697
|
Quote:
Originally Posted by John VV
ghostdog74
i still like the bash "fork" script .
and NO i will not post that,it is way to wicked .
|
its already written and discussed in computer security books and published to the whole world.
|
|
|
11-13-2009, 11:03 PM
|
#9
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,667
|
true but i think it is one of the baned things on the forum
i am getting way off topic
he will still need ImageMagick installed so that "-identify" can be used
|
|
|
11-13-2009, 11:12 PM
|
#10
|
Senior Member
Registered: Aug 2006
Posts: 2,697
|
Quote:
Originally Posted by John VV
he will still need ImageMagick installed so that "-identify" can be used
|
any tool that reads images and get their meta is fine. Its just that i have ImageMagick with me, hence the solution. if OP wants, he can even program in languages like Perl or Python and install modules specifically for that.
|
|
|
All times are GMT -5. The time now is 01:45 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
|
|