http://www.imagemagick.org/www/mogrify.html
mogrify -format jpg -background white -flatten *.png