Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { private static Bitmap rotate(Bitmap bmp, int rotation) { if (rotation == 0) return bmp; try { Matrix matrix = new Matrix(); matrix.preRotate(rotation); return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrix, true); } finally { bmp.recycle(); } } }