LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-14-2006, 10:02 AM   #1
barn63
Member
 
Registered: Jan 2006
Location: Macomb, IL
Distribution: Slackware 13.1
Posts: 152

Rep: Reputation: 17
Imagemagick


Is there a way to maybe create a script to rezize and rename all the .jpg files in a directory instead of going then all?
 
Old 11-14-2006, 11:11 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Throw them in a for statement.

Example:

Code:
for IMG in `ls *.jgp`
   do
      convert -geometry 800x600 $IMG $IMG
done
This would resize all JPG's in the pwd to 800x600 keeping the same name.

You could probably use the command basename or rename command to rename them.
 
Old 11-14-2006, 01:03 PM   #3
barn63
Member
 
Registered: Jan 2006
Location: Macomb, IL
Distribution: Slackware 13.1
Posts: 152

Original Poster
Rep: Reputation: 17
so your just using a for loop to resize all the pictures retured by ls?
 
Old 11-14-2006, 02:44 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by barn63
so your just using a for loop to resize all the pictures retured by ls?
Yes. Create a list of the files and you can replace the `ls` with `cat filename` if you prefer a different way to resize, etc.

Last edited by trickykid; 11-14-2006 at 02:45 PM.
 
  


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
imagemagick++ oliem Linux - Desktop 1 09-05-2006 01:07 PM
ImageMagick ilnli Linux - Software 5 09-03-2006 01:34 PM
ImageMagick without X jeru Debian 4 08-21-2004 07:29 PM
ImageMagick jasonmcneil0 Linux - Software 2 11-14-2003 06:49 PM
ImageMagick! ifm Linux - Software 0 06-20-2002 09:13 PM

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

All times are GMT -5. The time now is 06:57 PM.

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