convert *.bmp *.jpg ??

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kadkam
Posts: 9
Joined: 2008-01-09T08:20:23-07:00

convert *.bmp *.jpg ??

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert *.bmp *.jpg ??

Post 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
Post Reply