Here you can find the source of rotatePic(Bitmap bitmap, int degree)
public static Bitmap rotatePic(Bitmap bitmap, int degree)
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotatePic(Bitmap bitmap, int degree) { Matrix matrix = new Matrix(); matrix.postRotate(degree);/* w w w .j av a 2 s . com*/ int width = bitmap.getWidth(); int height = bitmap.getHeight(); return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true); } }