0

Hello all i am facing a problem regarding orientation of image, when saved on local storage. But the strange thing is that when i capture from the REAR camera and get it from storage path it works fine but when i capture it from FRONT camera and get it from storage path the orientation changes and that to the orientation changes differently for different devices.Please guys help me to get over this, here is my code

 Bitmap myBitmap = decodeFile(imgFile,imageWidth,imageHeight);
 Bitmap orientedBitmap = ExifUtil.rotateBitmap(imgFile.getAbsolutePath(), myBitmap);
 mainImage.setImageBitmap(orientedBitmap);

The ExifUtil.Java file code is here in this link

Sudhansu
  • 780
  • 1
  • 9
  • 28
  • `ExifUtil.rotateBitmap)'`. You are blindly rotating every bitmap. Why? And nobody can see how much and in which direction. – greenapps Apr 11 '17 at 13:46
  • `Thank You in advance`. Please do not thank in advance. Makes a bad impression. – greenapps Apr 11 '17 at 13:46
  • `mainImage.setImageBitmap(orientedBitmap);`. Change to `mainImage.setImageBitmap(myBitmap);`. Orientation adaption should be done by decodeFile(). – greenapps Apr 11 '17 at 13:54

0 Answers0