Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotateBitmap(Bitmap source, int degree) { Matrix matrix = new Matrix(); matrix.postRotate(degree); Bitmap temp = Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); if (null != source && !source.isRecycled()) { source.recycle(); source = null; } return temp; } }