Image Rotation Issue While Using CameraView

The I

image captured using CameraView gets rotated . How can we solve this problem?