I have a large number of images that can be any dimension that I need make into the same aspect ratio (basically square). So if one image is 100x300 the output should be 300x30
convert input.png -background white -gravity center -extent 100x300 -flatten output.png
See http://www.imagemagick.org/Usage/crop/#extent