Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    private static final Matrix mMatrix = new Matrix();

    public static Bitmap rotateBitmap(Bitmap bitmap, int rotationAngle) {
        mMatrix.reset();
        mMatrix.postRotate(rotationAngle);
        return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), mMatrix, false);
    }
}