It is currently Thu Jul 25, 2024 5:36 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Linux Shell Script To Resize Images Using 'convert' command
PostPosted: Tue Dec 04, 2012 12:26 pm  (#1) 
Offline
New Member

Joined: Dec 04, 2012
Posts: 1
I use Linux and GIMP i always use. I have often having to rescaling dozens of images from 8 Mpx to 1 Mpx for use online. With the GIMP i had to do it one at a time ( !) since it does not have the immediate possibility to use macros. I have resolved by writing the Bash shell scripts that there i enclose. Use the shell command "convert". Here's the script.

#!/bin/bash
#
#Scala.sh
#
#by KMZ 2012.-
#

fine () {
exit 0
}

if test -z "$1"
then
echo "use: scala.sh directory 400x300"
echo "to resize 400x300px all the images into directory"
fine
fi
q=$(ls -1 $1/*.* | wc -l)
echo "I'll do for $q files."

for file in $(ls -1 $1/*.*); do
echo $file
convert $file -resize $2 $file
done
echo "Done."
fine


Edited: English Language Only Please


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: A Macro Recorder for Gimp?
PostPosted: Tue Dec 04, 2012 2:38 pm  (#2) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I am Italian and of course I understand but are an exception

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) converting 32 bit images to 8 bit using batch script

5

No new posts Attachment(s) Script-Fu Scrolling Interface V1.1 for GIMP 2.10.18 Linux Ubuntu 64bit

4

No new posts Attachment(s) Batch export all opened images script for GIMP [Update]

22

No new posts Attachment(s) Can't resize brush

23

No new posts Attachment(s) [solved]quickly resize patterns

7



* Login  



Powered by phpBB3 © phpBB Group