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