0

So I have this activity in my app which's supposed to take a picture and then send it to another activity. I forced the orientation to be on portrait mode, and yet, after I take a picture and decode it into a bitmap, it rotates in a seemingly random direction, since I'm unable to fix it by rotating the image by a certain number of degrees. Any idea why?

public void onPictureTaken(byte[] data, Camera camera) {
bmp=BitmapFactory.decodeByteArray(data, 0, data.length );
};
Misha
  • 111
  • 1
  • 8
  • Ok, you force the activity orientation to Portrait. Do the users actually hold the device this way? Do they use the same app on tablets where the natural orientation is Landscape? – Alex Cohn Aug 04 '13 at 19:53
  • The device is supposed to be held on portrait mode, and no, it isn't supposed to be used on tablets. thanks – Misha Aug 04 '13 at 20:15
  • You wrote "it rotates in a seemingly random direction". Could this be caused by users holding the device in wrong orientation? – Alex Cohn Aug 04 '13 at 20:20
  • Also, do your users always work with the rear camera, or they can choose to switch to front camera, too ? – Alex Cohn Aug 04 '13 at 20:23
  • rear camera only, and I haven't tested it on an actual device, since I don't have one, only on the emulator, so it can't be caused by that. – Misha Aug 04 '13 at 20:26
  • So you use a webcam with emulator, right? – Alex Cohn Aug 04 '13 at 20:32
  • Umm the emulated camera they offer, actually. – Misha Aug 04 '13 at 20:34
  • Sorry, I don't know how the emulated camera works. But maybe it simply produces an image rotated randomly? – Alex Cohn Aug 04 '13 at 20:44
  • It might, but I highly doubt it. Thank you so much for your time anyway – Misha Aug 04 '13 at 20:47

0 Answers0