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);//from w w w . jav a2s . c om return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); } }