It seems like I could ignore something obvious, but I can't figure out how to get the raw (unscaled) sizes of the bitmap displayed in the ImageView.
For example, if I load a bitmap using Bitmap b = BitmapFactory.decodeResource(...), I can get these sizes from b.getWidth()and b.getHeight(), and I could pass the bitmap to ImageView using setImageBitmap(b). But if I have a subclass of ImageView, is there a way to get these dimensions without passing them explicitly? I guess I'm looking for an analog getImageBitmap()method of the ImageView setImageBitmap(), which will extract the Bitmap object that I can call getWidth()and getHeight()on. Any other way to get the original sizes will work too.
source
share