LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-07-2008, 04:55 PM   #1
swalker23
Member
 
Registered: Aug 2008
Location: Virginia, USA
Distribution: Kubuntu 10.04 x64
Posts: 85

Rep: Reputation: 15
Is there a terminal command to change the size of a group of images?


I have a folder with some .png icons in it and they are all 128x128 and I want to change to a smaller size. Instead of tediously changing each image one by one in gimp I was wondering is there a command I can use in terminal to change all the images to a certain size.
 
Old 11-07-2008, 05:05 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by swalker23 View Post
I have a folder with some .png icons in it and they are all 128x128 and I want to change to a smaller size. Instead of tediously changing each image one by one in gimp I was wondering is there a command I can use in terminal to change all the images to a certain size.
You can use a loop. If you are into the given directory, you could do this:

Code:
for file in *.png; do echo convert -resize 96x96 "$file" "${file/.png/_96x96}.png"; done
If you like the output, then remove "echo" to actually do the job.
 
Old 11-07-2008, 05:06 PM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
There's imagemagick or David's Batch Processor for the GIMP, which I can resize a series of files (http://members.ozemail.com.au/~hodsond/dbp.html). David's Batch Processor is a doddle to install: get the source, untar, cd into its directory, and then type make install (installs to ~/.gimp*/plugins).

Google should have answers on how to use imagemagick for resizing a series of files, for example: http://www.imagemagick.org/Usage/resize/#resize

Last edited by pwc101; 11-07-2008 at 05:07 PM.
 
Old 11-07-2008, 05:19 PM   #4
swalker23
Member
 
Registered: Aug 2008
Location: Virginia, USA
Distribution: Kubuntu 10.04 x64
Posts: 85

Original Poster
Rep: Reputation: 15
Thanks you guys. David Batch Processor looks like exactly what I need. It seems simple and easy to use. I will read more into imagemagick but it seems like I will be going with DBP.
 
  


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
how to change the size of terminal? wrapster Solaris / OpenSolaris 29 07-24-2009 10:20 AM
change font size in terminal window homerjpbody Linux - Newbie 3 08-08-2008 10:26 PM
How to change gnome-terminal command line from scrolling left to wrapping primorec Linux - Desktop 0 11-19-2007 03:24 AM
How to change font color and font size in terminal ? wlaw Linux - Newbie 3 05-15-2007 09:57 PM
Terminal/command prompt has insane refresh rate, looking how to change it. Wolvenmoon Linux - Newbie 2 06-01-2006 08:12 PM


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