0

How can we get the image in correct orientation? ExifInterface always returns 0. I tried using EasyImage (https://github.com/jkwiecien/EasyImage), however it produces the same results.

I tried every single suggestion from this thread without any luck: Why does an image captured using camera intent gets rotated on some devices on Android?

In Android 7 emulator I observe the following behaviour: once you take the image, it rotates 90 degrees while you are still in the camera - even before you accept the image.

What am I missing?

Here is what happens in the emulator and on Note 4:

1) White taking the picture:

before shot

2) Right after taking the picture, before even accepting it and before the application is even aware of any images and their orientation - you see it rotated:

after shot

nsimeonov
  • 704
  • 8
  • 18
  • This issue may be device specific, so please tell us which device it is. If your problem is with getting camera image via intent (EasyImage does that for you), please change the tags to **[tag:android-camera-intent]**. – Alex Cohn Oct 13 '18 at 11:47
  • This happened on Samsung Note 4 and literally any android 6 or 7 emulator I tried. – nsimeonov Oct 13 '18 at 15:54
  • Was it Intent or in-app camera? The emulator behaviour is not relevant for camera intent – Alex Cohn Oct 13 '18 at 16:01
  • I wish I could attach 2 images as it will make it instantly clear, but I'll try to describe it: The activity starts camera intent (all permissions are requested, Uri is passed so we can take a high-quality image, not just the thumbnail) and everything works so far. You hold the phone just like you would normally (portrait mode) then press the button to take a shot, and right after this moment the bottom part of the camera intent changes to two buttons "accept" and "cancel" (or retake - a checkmark and an X usually). And right in this moment before accepting the image it's rotated 90 degrees. – nsimeonov Oct 13 '18 at 17:10
  • I edited my post to show what I mean. This happens in emulator and on Samsung Note 4. – nsimeonov Oct 13 '18 at 17:25
  • Thanks for detailed description and illustrations. Unfortunately, I can only repeat again: don't trust emulator behavior when it comes to non-contractual details, e.g. camera orientation. – Alex Cohn Oct 13 '18 at 19:40

0 Answers0