By using this code we can rotate an image:
public static Bitmap RotateBitmap(Bitmap source, float angle) {
      Matrix matrix = new Matrix();
      matrix.postRotate(angle);
      return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true);
}
But how can we flip an image horizontally or vertically?
 
     
     
     
     
     
     
     
    