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 {
    private static Bitmap rotate(Bitmap result, int rotation) {
        Matrix matrix = new Matrix();
        matrix.setRotate(rotation, (float) result.getWidth() / 2, (float) result.getHeight() / 2);

        return Bitmap.createBitmap(result, 0, 0, result.getWidth(), result.getHeight(), matrix, true);
    }
}