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!

Warning: A non-numeric value encountered in /var/www/ on line 14

Leave a Reply