Java tutorial
//package com.java2s; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static int getImageHeight(final Context context, final int drawable) { int bg_height = 0; Bitmap bmp = BitmapFactory.decodeResource(context.getResources(), drawable); bg_height = bmp.getHeight(); bmp.recycle(); return bg_height; } }