Make Bitmap big via Matrix - Android Graphics

Android examples for Graphics:Bitmap Paint

Description

Make Bitmap big via Matrix

Demo Code


//package com.java2s;
import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    public static Bitmap big(Bitmap bitmap) {
        Matrix matrix = new Matrix();
        matrix.postScale(3.5f, 3.5f); //w  w w.j a  v  a2s  .c  om
        Bitmap resizeBmp = Bitmap.createBitmap(bitmap, 0, 0,
                bitmap.getWidth(), bitmap.getHeight(), matrix, true);
        return resizeBmp;
    }
}

Related Tutorials