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