How to do the same convert on a lot of images at once

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
mgilsbach

How to do the same convert on a lot of images at once

Post by mgilsbach »

Hello,

I am new to this app, but have a problem I need to resolve. I used ImageMagick to convert a BG color to transparent like this:

Code: Select all

convert c:\ADR_141.gif -transparent "#FFFFEF" c:\ADR_141.gif
Worked great. Trouble is that I have 100s of images that I need to do the same thing to, some GIF and some JPG. Is there a way to do the above to a whole directory full of images so that it will convert each image and save it as the original name? Something like:

Code: Select all

convert c:\*.* -transparent "#FFFFEF" c:\*.*
Thanks for your help,
Mike
mgilsbach

Re: How to do the same convert on a lot of images at once

Post by mgilsbach »

Awesome! So, I just used this and it worked great:

Code: Select all

mogrify -transparent "#FFFFEF" c:\imagetest\*.*
Thanks for your help!

-Mike
Post Reply