resizing a set of images
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
resizing a set of images | Nasim Shamlou | 21 Nov 08:23 |
resizing a set of images | Malcolm Tredinnick | 21 Nov 08:26 |
resizing a set of images | Patrick | 21 Nov 15:50 |
resizing a set of images | David Hodson | 21 Nov 13:34 |
resizing a set of images | Philippe Rousselot | 21 Nov 16:07 |
20021121200005.519DB1008A@l... | 07 Oct 20:15 | |
resizing a set of images | Mohamed El Dawy | 22 Nov 05:02 |
resizing a set of images
Morning,
I remember someone else having asked something similar to the question I have, but I looked and looked but couldn't find it, so I'll ask again:
Is there a way to resize a set of images all at once, instead of editing
them one by one?
And if this can't be done with The Gimp, is there another program I could
use?
I have about 100 images, and it would take far too long to start resizing each one individually.
Thanks. -Nasim Sh.
resizing a set of images
On Thu, Nov 21, 2002 at 08:23:02AM +0100, Nasim Shamlou wrote: [...]
Is there a way to resize a set of images all at once, instead of editing them one by one?
And if this can't be done with The Gimp, is there another program I could use?I have about 100 images, and it would take far too long to start resizing each one individually.
Stock answer #317:
Use 'convert' from the ImageMagick set of utilities.
Cheers, Malcolm
resizing a set of images
Malcolm Tredinnick wrote:
> On Thu, Nov 21, 2002 at 08:23:02AM +0100, Nasim Shamlou wrote:
> [...]
>
>>Is there a way to resize a set of images all at once, instead of editing
>>them one by one?
> Stock answer #317: > Use 'convert' from the ImageMagick set of utilities.
Alternative answer, for the command line impaired: try dbp. http://www.ozemail.com.au/~hodsond/dbp.html
resizing a set of images
On Thursday 21 November 2002 02:23 am, Nasim Shamlou wrote:
Morning,
I remember someone else having asked something similar to the question I have, but I looked and looked but couldn't find it, so I'll ask again:
Is there a way to resize a set of images all at once, instead of editing them one by one?
And if this can't be done with The Gimp, is there another program I could use?I have about 100 images, and it would take far too long to start resizing each one individually.
Thanks. -Nasim Sh.
------------------------------
Nasim,
Gimp can do this function too, but ImageMagick is much easier and
quicker to use for such things.
Patrick
--- KMail v1.4.3 --- SuSE Linux Pro v8.1 ---
Registered Linux User #225206
resizing a set of images
Patrick wrote:
On Thursday 21 November 2002 02:23 am, Nasim Shamlou wrote:
Morning,
I remember someone else having asked something similar to the question I have, but I looked and looked but couldn't find it, so I'll ask again:
Is there a way to resize a set of images all at once, instead of editing them one by one?
And if this can't be done with The Gimp, is there another program I could use?I have about 100 images, and it would take far too long to start resizing each one individually.
Thanks. -Nasim Sh.
Hi,
here are a few scripts that may be usefull
sorry it is a little bit long
create a txt file copy the script in it
type chmod 755 the_name_of_the_file
put the file in /usr/bin
and use the cript from the folder containing the files
#!/bin/bash
for i in *jpg
do
# rotate the file and change its name to temp.jpeg
put here one of the line starting by convert that is in between the~~~~~
# remove the file rm "$i" ;
# give temp.jpeg the file name mv temp.jpeg $i ;
done
~~~~~~~
#land2portrait 90 CCW
convert -rotate "-90>" "$i" temp.jpeg;
#land2portrait 90 CCW convert -rotate "90>" "$i" temp.jpeg;
#port2land 90_CCW convert -rotate "-90" "$i" temp.jpeg;
#portrait 180 convert -rotate "-180" "$i" temp.jpeg; ~~~~~~~~
this file allows you to create a web page (W3C compliant) with thumnails of pictures as link to the same pictures.
you may need to have to adjust the file if the mail system screwed up by adding carriage returns
you will find there commands to resize images
#!/bin/sh
# ~~~~~~~~ original credit ~~~~~~~~~~~~~
#vim: set sw=4 ts=4 et:
# wirtten by katja socher
# and guido socher
# ~~~~~~ end original credit ~~~~~~~~~~~
# I found the file at # http://linuxfocus.org/English/July2001/article211.shtml
# the file has been heavily modified by myself # to be able to create w3 compliant html page
# this is my first bash script, don't hesitate to email me # any error or improvement
# Philippe Rousselot Aug. 2002, EMail: linux at rousselot dot org
ver="1.0"
one=1
number=1
extension=".html"
page_numb=1 ;
j=0
array=('' '' '')
test()
{
case $page_numb in
1) page_numb="01" ;;
2) page_numb="02" ;;
3) page_numb="03" ;;
4) page_numb="04" ;;
5) page_numb="05" ;;
6) page_numb="06" ;;
7) page_numb="07" ;;
8) page_numb="08" ;;
9) page_numb="09" ;;
esac
}
help()
{
cat < $filename << EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
"$title"
EOF
}
footer()
{
cat >> $filename << EOF
$title2
EOF
}
while [ -n "$1" ];
do
case $1 in
-h) help;shift 1;;
--) break;;
-W) width=$2; break;;
-H) echo "wrong argument. It should be -W";exit 1;;
-N) echo "wrong argument. It should be -W";exit 1;;
-n) echo "wrong argument. It should be -W";exit 1;;
-*) echo "error: no such option $1. -h for help";exit 1;;
*) break;;
esac
done
while [ -n "$3" ];
do
case $3 in
-h) help;shift 1;;
--) break;;
-W) echo "wrong argument. It should be -H";exit 1;;
-H) height=$4 ;break;;
-N) echo "wrong argument. It should be -H";exit 1;;
-n) echo "wrong argument. It should be -H";exit 1;;
-*) echo "error: no such option $1. -h for help";exit 1;;
*) break;;
esac
done
while [ -n "$5" ];
do
case $5 in
-h) help;shift 1;;
--) break;;
-W) echo "wrong argument. It should be -N";exit 1;;
-H) echo "wrong argument. It should be -N";exit 1;;
-N) name=$6 ; break;;
-n) echo "wrong argument. It should be -N";exit 1;;
-*) echo "error: no such option $1. -h for help";exit 1;;
*) break;;
esac
done
while [ -n "$7" ];
do
case $7 in
-h) help;shift 1;;
--) break;;
-W) echo "wrong argument. It should be -n";exit 1;;
-H) echo "wrong argument. It should be -n";exit 1;;
-N) echo "wrong argument. It should be -n";exit 1;;
-n) quota=$8 ; break;;
-*) echo "error: no such option $1. -h for help";exit 1;;
*) break;;
esac
done
dirname_image=`dirname "$9"`
th="thumbnails"
thumbnail_dir="$dirname_image/$th"
test
filename="$dirname_image/$name$page_numb$extension";
title="$name$page_numb$extension";
mkdir "$thumbnail_dir"
if [ -z "$9" ];then error "No image specified, -h for help" 1 fi
# process each image
i=0;
header;
shift 8
for image in $* ;
do
echo "$image"
if [ ! -r "$image" ]; then
echo "ERROR: can not read $image\n"
else
i=`expr $i + 1`
bn=`basename "$image"`
array[j]=$bn
j=`expr $j + 1` thumbnail="$thumbnail_dir/t_$bn"
convert -geometry "${width}x$height" "$image" "$thumbnail"
cat >> $filename << EOF
EOF
modulo=`expr $i % 3`
if [ "$modulo" = "0" ]; then
cat >> $filename << EOF
${array[0]}
${array[1]}
${array[2]}
EOF
j=0
array=('' '' '')
fi
modulo=`expr $i % $quota`
if [ "$modulo" = "0" ]; then
page_numb=`expr $page_numb + 1`;
test
filename2="$dirname_image/$name$page_numb$extension";
title2="$name$page_numb$extension";
if [ "$number" -ne "$one" ]; then
echo "> $filename ;
fi
number=`expr $number + 1`
i=0
footer;
filename=$filename2
title=$title2
header;
fi
fi
done
footer
resizing a set of images
Good Morning...
well.. there is of course Irfan View, which can do
batch conversion of files, including the function you
want (resize) plus lots of other useful functions
(rotate, apply a filter, ... etc)...
u can find it at www.irfanview.com
___