get Bitmap from source Bitmap by rectangle - Android Graphics

Android examples for Graphics:Bitmap Read

Description

get Bitmap from source Bitmap by rectangle

Demo Code


//package com.java2s;

import android.graphics.Bitmap;

public class Main {

    public static Bitmap getBitmap(Bitmap source, int x, int y, int width,
            int height) {
        Bitmap bitmap = Bitmap.createBitmap(source, x, y, width, height);
        return bitmap;
    }//from  w  w w .  ja v a  2s . c  o  m
}

Related Tutorials