title: How to get the Correct orientation of the image selected from the Default Image gallery
body: <p>I have gone through some of the links to get the correct image orientation of the image selected from the  default image gallery to be worked standard in all devices the exif tag always returns 0.</p>
  
  <p><a href="https://stackoverflow.com/questions/13245556/exif-orientation-tag-value-always-0-for-image-taken-with-portrait-camera-app-and">EXIF orientation tag value always 0 for image taken with portrait camera app android</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20106589/exif-orientation-tag-returns-0">Exif orientation tag returns 0</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5574561/exif-data-tag-orientation-always-0">Exif data TAG_ORIENTATION always 0</a></p>
  
  <p><a href="http://mobisocial.stanford.edu/news/2011/08/rotating-images-in-android/" rel="noreferrer">http://mobisocial.stanford.edu/news/2011/08/rotating-images-in-android/</a></p>
  
  <p>How to get an exact solution that will work on all devices?</p>