convert -define jpeg:size=127x127 input.jpg -thumbnail 200x200^ -gravity center -extent 200x200 output.jpg