Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.graphics.BitmapFactory;

public class Main {
    public static double[] getImageWidthAndHeight(String path) {
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        BitmapFactory.decodeFile(path, options);
        double imageWidth = options.outWidth;
        double imageHeight = options.outHeight;
        return new double[] { imageWidth, imageHeight };
    }
}