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 scaleToFitWidth(Bitmap bitmap, int i) {
        return Bitmap.createScaledBitmap(bitmap, i,
                (int) (((float) i / (float) bitmap.getWidth()) * (float) bitmap.getHeight()), false);
    }
}