get Bitmap Of Height - Android Graphics

Android examples for Graphics:Bitmap Size

Description

get Bitmap Of Height

Demo Code


//package com.java2s;

import android.graphics.BitmapFactory;

public class Main {
    public static int getBitmapOfHeight(String file) {
        try {/*from   w ww . ja v  a2  s.  co m*/
            BitmapFactory.Options options = new BitmapFactory.Options();
            options.inJustDecodeBounds = true;
            BitmapFactory.decodeFile(file, options);

            return options.outHeight;
        } catch (Exception e) {
            // TODO: handle exception
            return 0;
        }
    }
}

Related Tutorials