Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.*;

public class Main {
    public static Bitmap cropBitmap(Bitmap source, int x, int y, int width, int height) {
        Bitmap bmp = Bitmap.createBitmap(source, x, y, width, height, null, false);
        if (source != null && bmp != source) {
            source.recycle();
        }
        return bmp;
    }
}