I implemented a camera for my application, take a snapshot so:
public void savedPhoto(View v) { camera.takePicture(null, null, new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { try { FileOutputStream fos = new FileOutputStream(photoFile); fos.write(data); fos.close(); String path = photoFile.getPath(); intent = new Intent(CameraActivity.this, PhotoActivity.class); intent.putExtra("image", path); startActivity(intent); } catch (Exception e) { e.printStackTrace(); } } }); } where I transfer the image path to another activity . In PhotoActivity I catch the path of the snapshot:
String path = getIntent().getStringExtra("image"); imgView = (ImageView) findViewById(R.id.Image); imgView.setImageDrawable(Drawable.createFromPath(path)); Then draw it in the ImageView . Everything works, but only the image is rotated by -90 degrees. How to rotate the ImageView or the image itself by 90 degrees to make it look normal?