Handled rotation before cropping and saving the image

In samsung S4 when we are taking photos in portrait mode its rotating the image by 90 degrees, so used EXIF data to check the degrees by which image is rotated, and then rotating the image in reverse direction by same degrees to avoid this.