Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotation90(Bitmap bitmap) { if (bitmap == null) return null; if (bitmap.isRecycled()) return null; Bitmap bmp = null; Matrix matrix = new Matrix(); matrix.postRotate(90); bmp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, false); bitmap.recycle(); return bmp; } }