Page 1 of 1

convert *.bmp *.jpg ??

Posted: 2008-10-07T05:59:18-07:00
by kadkam
hi
(I use windows)

I've more .bmp files that i want to convert (copy) in .jpg format;
I want that the filename of each file is the same.
(ex. pippo.bmp become pippo.jpg)

what's the command line string?

thanks

Re: convert *.bmp *.jpg ??

Posted: 2008-10-07T08:51:06-07:00
by fmw42
kadkam wrote:hi
(I use windows)

I've more .bmp files that i want to convert (copy) in .jpg format;
I want that the filename of each file is the same.
(ex. pippo.bmp become pippo.jpg)

what's the command line string?

thanks

See mogrify to convert all files in a directory
http://www.imagemagick.org/Usage/basics/#mogrify

but be careful

mogrify -format jpg *.bmp

Alternately, you can do it with convert, one image at a time (but two steps)

name=`identify -ping -format "%t" image.bmp`
convert image.bmp $name.jpg

You may be able to combine this as:

file="image.bmp"
convert $file `identify -ping -format "%t" $file`.bmp