0

I have a image captura.png in Folder

The original size is: 279 x 450 px.

But when I get width Height android returns

56*52.

Bitmap windowBitmap = BitmapFactory.decodeResource(getResources(),  R.drawable.captura);
int width = windowBitmap.getHeight();
int height = windowBitmap.getWidth();

only have one image, I need the size in pixels. What can I do?

Zain
  • 37,492
  • 7
  • 60
  • 84
Gilberto Ibarra
  • 2,849
  • 2
  • 27
  • 38

1 Answers1

0

It's probably because you've got the file placed in a folder with different image density.

Refer to: Bitmap getWidth returns wrong value

Community
  • 1
  • 1
RizJa
  • 1,961
  • 1
  • 21
  • 38