switch horizontal and vertical dimensions if picture is taken in portrait mode