You are not logged in.

#1 2004-09-17 03:28:38

GGO
Member
From: Kona, Hawaii
Registered: 2004-05-20
Posts: 48
Website

command line image utility?

I want to take approximately 600 targa images, and convert them to jpegs. Does anyone know a command line utility to do this with?

Offline

#2 2004-09-17 03:49:08

ghostwalker
Member
From: Tacoma, WA
Registered: 2004-07-28
Posts: 140

Re: command line image utility?

imagemagick  -- i believe you can do a wildcard I am not sure.
convert *.tga *.jpg

Walt


P4 2.8Ghz @ 2.8Ghz SL6WT
Zalman CNPS7000-Cu
865PE Neo-2 LS BIOs 2.4
512mb Mushkin Level II
160GB Maxtor HD
Geforce 4 440MX
Antec 3700 1 exhaust and 1 intake fans
Linux 2.6.x
Linux user 314187
ArchLinux

Offline

#3 2004-09-17 07:46:46

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: command line image utility?

no, that will not work. it will create one file called *.jpg. this requires some (very simple) bash scripting.

for tgafile in *.tga ; do
    jpgfile=`echo $tgafile | sed 's,tga$,jpg,'`
    convert -quality 100 "$tgafile" "$jpgfile"
done

Here, I provided the highest quality jpg compression possible. Values range from 1-100. You can try 'convert -quality 80 myfile.tga myfile.jpg' and fiddle with different quality values to pick a setting that satisfies your eyes and your hard drive. smile Read the man page for convert, you can do a LOT of really neat stuff, such as resizing images, or making animated mng files.

Offline

#4 2004-09-17 11:28:32

zezaz
Member
From: Bordeaux, France
Registered: 2004-04-26
Posts: 80
Website

Re: command line image utility?

GGO wrote:

I want to take approximately 600 targa images, and convert them to jpegs. Does anyone know a command line utility to do this with?

Just in case the command line is not mandatory for you, you could have a look to gimp-dbp .

Quoting gimp-dbp's home page:

I got tired of people asking on Gimp newsgroups and mailing lists, "How can I resize a directory full of images", and even more tired of the standard reply, "Use ImageMagick". DBP allows users to do common processing tasks on multiple images, without leaving Gimp or having to learn a scripting language.

To be honest, i already never used this package myself smile . But i thought you could be interested.

Offline

#5 2004-09-17 17:13:57

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: command line image utility?

gimp-dbp is really great in primitive batch processing, but i'm not sure about targa support (dont knwo this format)


The impossible missions are the only ones which succeed.

Offline

Board footer

Powered by FluxBB