Here you can find the source of RotateBitmap(Bitmap source, float angle)
public static Bitmap RotateBitmap(Bitmap source, float angle)
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap RotateBitmap(Bitmap source, float angle) { Matrix matrix = new Matrix(); matrix.postRotate(angle);//w w w. ja va2s . c o m return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); } }