abc
abc

Reputation: 2027

Android's method of loading bitmaps

I have an application that loads Bitmaps from my Assets folder. I use decodeStream() to get them and then I use createScaledBitmaps() to scale them to the appropriate size. If I have an image thats 50x50 in physical pixels, and a density of 160dpi, and I'm on a screen that has a density of 320dpi, will Android automatically scale up the density for my Bitmap by a factor of 2 (i.e from 160dpi to 320dpi) for Bitmaps?

Upvotes: 0

Views: 44

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93569

No. When you decode a bitmap, dpi doesn't matter. Only width and height. SO you'll have a 50x50 pixel image. When you draw that image, you can scale it if you want.

Upvotes: 1

Related Questions