convert imagemagik rescale and pad images