Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.Matrix; import android.support.annotation.NonNull; public class Main { public static Bitmap rotate(@NonNull final Bitmap bitmap, final float angle) { final Matrix matrix = new Matrix(); matrix.postRotate(angle); return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); } }