biokys / cropimage

Replacement for deprecated official Android crop image function
555 stars 292 forks source link

Portrait Image rotated on crop view #16

Open rajeshsubramanian opened 11 years ago

rajeshsubramanian commented 11 years ago

When I take a picture in portrait mode, the crop view automatically rotates it by 90 degrees. Does not seem to happen in landscape. Is there a way to prevent this?

RioTech commented 11 years ago

even i am facing same issue

rajeshsubramanian commented 11 years ago

This is related to the way images are read from storage. For getting the right orientation you will have read the Exif data on the photo file and rotate the image you are displaying in the crop screen. This post - http://stackoverflow.com/questions/14066038/why-image-captured-using-camera-intent-gets-rotated-on-some-devices-in-android - had some helpful hints. Keep in mind that this will only work if your image file has the relevant Exif information. I noticed that if I implemented my own camera preview, by default the rotation information is not saved to the photo file I save out. It has to be manually added in.

praveenb commented 9 years ago

I see the same issue as @rajeshsubramanian said. and the above ref link solved the issue..... Thank you @blork