Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotateImage(Bitmap input, int rotation) { // rotate Image Matrix rotateMatrix = new Matrix(); rotateMatrix.postRotate(rotation); Bitmap rotatedBitmap = Bitmap.createBitmap(input, 0, 0, input.getWidth(), input.getHeight(), rotateMatrix, false); return rotatedBitmap; } }