Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { private static Bitmap rotate(Bitmap result, int rotation) { Matrix matrix = new Matrix(); matrix.setRotate(rotation, (float) result.getWidth() / 2, (float) result.getHeight() / 2); return Bitmap.createBitmap(result, 0, 0, result.getWidth(), result.getHeight(), matrix, true); } }