ImageMagick convert for many files

Have a slew of files you need to convert from one format to another? I capture a lot of screenshots from WW2OL, and they’re all saved as large BMPs by default. So I went looking for a quick and dirty way to convert them all to JPG. ImageMagick comes with _convert_, which makes it easy going from one format to another, but with almost 300, that meant a big loop with name substitutions, etc., etc.

In my search I came across parallel from Gnu, and gave it a shot:

parallel convert '{} {.}.png' ::: *.jpg

This was all I needed to do the job. It broke the task down to worker processes and zipped through it in no time flat! Add this one to your unix toolbox!

About Michael Carter

Programmer, Pilot/Builder and Amateur Radio enthusiast living in the Bay Area of California.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply