title: Rotating image decentres image using janmuller library
body: <p>I am using janmuller android library to perform rotation of an image . On rotating it 90 degrees to the left or right the image is rotated , however it gets de centred on the screen . This is the code I have used from janmuller library</p>
  
  <pre><code>    public void onRotateRight(View v) {
      mBitmap = Util.rotateImage(mBitmap, 90);
      RotateBitmap rotateBitmap = new RotateBitmap(mBitmap);
      mImageView.setImageRotateBitmapResetBase(rotateBitmap, true);
      mRunFaceDetection.run();
      }
  </code></pre>
  
  <p>This is the rotateImage function</p>
  
  <pre><code>    public static Bitmap rotateImage(Bitmap src, float degree) {
      // create new matrix
      Matrix matrix = new Matrix();
      // setup rotation degree
      matrix.postRotate(degree);
      Bitmap bmp = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix, true);
      return bmp;
  }
  </code></pre>