i hate this company. All them devices have a lot of bugs. Ok question : Im trying to fix stupid problem (which as i know exist more than 5 years) Its photo taken from camera - rotated on 90 degree. I have two devices :
Nexus 5p and Samsung j2
Nexus - work perfect. Everything fine.
Samsung - photo rotated
For example :
Photo size - nexus : Portrate : width 1000, height 1900. Landscape :
width 1900 , height 1000
Lets see on samsung device :
Photo size - Portrate: width 1900(?????) height - 1000(????)
rotate to landscape : width 1900 height 1000
After some testing : if make photo in landscape mode on samsung device - than everything ok. Photo not rotated
If make photo in PORTRATE - photo rotated on 90 degree. (BUT size of photo as on landscape (HOW ITS POSSIBLE) ?
Anyone know how to fix this stupid bug ? Maybe any can tell me how to detect orientation for camera ? Im using IntentActivity for photo :
String _path = Environment.getExternalStorageDirectory()
+ File.separator + "camera_img.jpg";
File file = new File(_path);
Uri outputFileUri = Uri.fromFile(file);
Intent intent = new Intent(
android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(intent, CAMERA_REQUEST);
Any help ? I also add a checker , if its samsung device than rotate. But rotation good only if we create photo in portrate mode. In landscape everything fine. So i need somehow detected in which orientation photo was created. Any one know ?