-1

In my android application I am using custom camera for capturing image when I am capturing the image is storing correctly but when i upload that image to server it is saving in both landscape and portrait.

My question is it is possible to upload the image to server only in landscape mode even if the picture is taken in portrait mode. please help me any one in this.

Krishna
  • 4,892
  • 18
  • 63
  • 98
  • "it is saving in both landscape and portrait." image cannot be both portrait and landscape... – Marcin Orlowski Jul 05 '13 at 09:24
  • possible duplicate of [Android Camera Intent Saving Image Landscape When Taken Portrait](http://stackoverflow.com/questions/12933085/android-camera-intent-saving-image-landscape-when-taken-portrait) – Andrea Motto Feb 07 '15 at 03:31

1 Answers1

0

Yes, it is posible try it.

Matrix matrix = new Matrix();
matrix.postRotate(90F);
Bitmap newBitmap = Bitmap.createBitmap(bitmap,0, 0, bitmap.getWidth(), bitmap.getHeight(),   matrix, true);
imageView.setImageBitmap(newBitmap);
imageView.setBackgroundResource(imageBackground);
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
nilesh patel
  • 834
  • 1
  • 5
  • 10