Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}