Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.ContentResolver;

import android.graphics.*;

import android.graphics.BitmapFactory.Options;
import android.net.Uri;

import java.io.*;

public class Main {
    public static void decodeSize(ContentResolver contentResolver, Uri uri, Point out) throws IOException {
        Options opts = new Options();
        opts.inJustDecodeBounds = true;

        BitmapFactory.decodeStream(contentResolver.openInputStream(uri), null, opts);

        out.set(opts.outWidth, opts.outHeight);
    }
}