Java tutorial
//package com.java2s; import android.graphics.BitmapFactory; import android.graphics.BitmapFactory.Options; public class Main { private static void decodeBounds(Options options, byte[] data) { options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(data, 0, data.length, options); } }