Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.InputStream;

import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.util.Pair;

public class Main {
    public static Pair<Integer, Integer> getDimensionsForStream(InputStream in) {
        Options options = new Options();
        options.inJustDecodeBounds = true;
        BitmapFactory.decodeStream(in, null, options);
        return new Pair<Integer, Integer>(options.outWidth, options.outHeight);
    }
}