adjust the size of image with equal proportion