Get the displayed size of an image inside an ImageView
the following will work: ih=imageView.getMeasuredHeight();//height of imageView iw=imageView.getMeasuredWidth();//width of imageView iH=imageView.getDrawable().getIntrinsicHeight();//original height of underlying image iW=imageView.getDrawable().getIntrinsicWidth();//original width of underlying image if (ih/iH<=iw/iW) iw=iW*ih/iH;//rescaled width of image within ImageView else ih= iH*iw/iW;//rescaled height of image within ImageView (iw x ih) now represents the actual rescaled (width x height) for the image within the view (in other … Read more