handle phone rotations and also change the height ratio to maintain image aspect ratio.