How To Get Width And Height Of The Image?
HI, I want to get width and height of the image which i was stored in the drawable folder. Is this possible, if so please let me know ?
Solution 1:
try
BitmapDrawable bd=(BitmapDrawable) this.getResources().getDrawable(R.drawable.icon);
int height=bd.getBitmap().getHeight();
int width=bd.getBitmap().getWidth();
Solution 2:
I have follow this link :-
Drawabled= getResources().getDrawable(R.drawable.yourimage);
inth= d.getIntrinsicHeight();
intw= d.getIntrinsicWidth();
Post a Comment for "How To Get Width And Height Of The Image?"