Here you can find the source of rotate(Bitmap bitmap, int degree)
public static Bitmap rotate(Bitmap bitmap, int degree)
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotate(Bitmap bitmap, int degree) { int w = bitmap.getWidth(); int h = bitmap.getHeight(); Matrix mtx = new Matrix(); mtx.postRotate(degree);// w w w. ja v a2 s . c om Bitmap rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0, w, h, mtx, true); bitmap.recycle(); return rotatedBitmap; } }