I have used the following code to pick up an image from phone’s gallery:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),
USE_LIBRARY_PIC_REQUEST);
In onActivityResult(), it gives the filepath, I tried getting bitmap using filepath, but it always gives it in landscape view. Is there a way to get that image in portrait view always?
Code for getting filepath:
Uri selectedImageUri = data.getData();
selectedImagePath = getPath(selectedImageUri);
This is how i got bitmap using file path:
Bitmap bmp=BitmapFactory.decodeFile(selectedImagePath);
to get original image you can use this method.