I had a thousand image files the kids had photographed when creating a stop motion video. An ‘auto-levels’ on many of the images was required to brighten them up so at the command line I used the following (with ImageMagick already installed of course):
for FILE in $(ls /home/jonny/tmp/stopmotion/*.JPG); do convert -auto-level $FILE /home/jonny/tmp/stopmotion-fixed/$(basename $FILE) ; done
ImageMagick is impressive – getting through each image in under a second. Example conversion below: