Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotateBitmap(Bitmap bmp, int degrees) { if (degrees != 0) { Matrix matrix = new Matrix(); matrix.postRotate(degrees % 360); return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrix, true); } return bmp; } }