投稿した画像から、ImageView に FIT_CENTER (または imageView よりも大きいドローアブルを持つ CENTER_INSIDE) の scaleType があると仮定します
そのように表示サイズを計算できます
boolean landscape = imageView.getWidth() > imageView.getHeight();
float displayedHeight;
float displayedWidth;
if (landscape){
displayedHeight = imageView.getHeight();
displayedWidth = (float) drawableWidth * imageView.getHeight() / drawableHeight;
} else {
displayedHeight = (float) drawableHeight * imageView.getWidth() / drawableWidth;
displayedWidth = imageView.getWidth();
}
注: コードは読みやすくするために単純化されていません。
すべてのscaleTypesに適用できるもう1つのより堅牢なアプローチは、imageViewが画像をスケーリングするために使用したマトリックスを使用することです
float[] f = new float[9];
imageView.getImageMatrix().getValues(f);
float displayedWidth = drawableWidth * f[Matrix.MSCALE_X];
float displayedHeight = drawableHeight * f[Matrix.MSCALE_Y];