public static Bitmap rotateImage(Bitmap source,float angle){
  Bitmap retVal;
  Matrix matrix=new Matrix();
  matrix.postRotate(angle);
  retVal=Bitmap.createBitmap(source,0,0,source.getWidth(),source.getHeight(),matrix,true);
  return retVal;
}

public static Bitmap rotateImage ( Bitmap source , float angle ) { Bitmap retVal ; Matrix matrix = new Matrix ( ) ; matrix . postRotate ( angle ) ; retVal = Bitmap . createBitmap ( source , 0 , 0 , source . getWidth ( ) , source . getHeight ( ) , matrix , true ) ; return retVal ; }
rotate the bitmap if the image is in landscape camera
