Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

import android.content.*;
import java.io.*;

public class Main {
    public static Bitmap loadScaledBitmap(Context context, String bitmapFilePath, int widthDp, int heightDp)
            throws IOException {
        //create movie icon
        Bitmap bitmap;
        bitmap = BitmapFactory.decodeStream(context.openFileInput(bitmapFilePath));
        bitmap = Bitmap.createScaledBitmap(bitmap, widthDp, heightDp, true);
        return bitmap;
    }
}