Android examples for android.graphics:Bitmap Operation
rotate Bitmap Image
import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap rotateImage(Bitmap img, int degree) { Matrix matrix = new Matrix(); matrix.postRotate(degree);//from w w w . jav a 2 s. com Bitmap rotatedImg = Bitmap.createBitmap(img, 0, 0, img.getWidth(), img.getHeight(), matrix, true); // img.recycle(); return rotatedImg; } }