2

I'm developing a new android app, and I use a surface to take a picture, and save her. When take a picture and she is saved, when I'm going to folder and open her, the image are inverted.

For exemple: If I take the picture and I'm in a left side of the screen, when I open her, I'm in the right side.

How I solved this?

Bitmap bitmapPicture = BitmapFactory.decodeByteArray(arg0, 0, arg0.length); 


try {
   bitmapPicture.compress(CompressFormat.PNG, 100, new FileOutputStream("/sdcard/images/image3.jpg"));
} catch (FileNotFoundException e) {
   e.printStackTrace();
}   

That is the code I use to save the pic.

Tevez15
  • 43
  • 6
  • 1
    THis is a common issue on Android: Take a look here: http://stackoverflow.com/questions/10530165/android-camera-orientation-issue – Manitoba Nov 26 '13 at 12:47
  • The problem continues, I use the code on the link bellow: http://pastebin.com/DRcj68vX And that is the result. – Tevez15 Nov 26 '13 at 16:39
  • I've noticed this issue can be handled differently on Android devices. I will work on some and not on others. – Manitoba Nov 26 '13 at 17:13

1 Answers1

0

The best solution so far would be to force the orientation of your surface holder:

Take a look at this page: http://hashapps.tumblr.com/post/1337347197/android-problem-of-orientation-of-camera-preview

Manitoba
  • 8,522
  • 11
  • 60
  • 122
  • This question sounds like mirror-image(left/right). Your answer is about the landscape/portrait issue. – Geobits Nov 26 '13 at 17:17