KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'am opening camera app on click of a button. And displaying the captured photo in next activity. But the captured photo is rotating by 90 degrees. When I display the image in a view after I capture it, it's orientation is always landscape. Why is the photo not being shown in portrait as is when the photo is taken in portrait mode? onClick of a button : Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(APP_DIR+"/latest.png"))); startActivityForResult(i, CAPTURE_PHOTO_CONSTANT); Inside onActvityresult: bmp = BitmapFactory.decodeFile(APP_DIR+"/latest.png"); startActivity(new Intent(this, DisplayActivity.class)); Displaying captured photo: photoViewRelativeLayout.setBackgroundDrawable(new BitmapDrawable(getResources(), CaptureActivity.bmp));
Tags (comma-separated)
Save Edits
Cancel