Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Point; public class Main { public static Point getImageDimension(Context context, int resource) { Bitmap bm = BitmapFactory.decodeResource(context.getResources(), resource); Point point = new Point(); point.x = bm.getWidth(); point.y = bm.getHeight(); bm.recycle(); bm = null; return point; } }