Alex Rivera | Logout

Bitmap width/height different after loading from Resource

Asked 2011-02-26T16:36:46.737
18

1st. i'am new to Android coding :)

What I do is I load an Bitmap from my res/drawable-mdpi with

BitmapFactory.decodeResource(getResources(), R.drawable.cat_ground_01);

after I Log out the width/height of the Bitmap it tells me an other value then the Bitmap realy is.

That's kinda difficult to place Bitmaps pixelperfect e.g. overlap a bitmap of an face with an bitmap of mouth.

maybe I'am just missing some knowledge for this Topic :9 I hope you can help.

Edit
Report

1 Answer

12

Can't you just put the resource in the nodpi folder?

i.e. res/drawable-nodpi

This is what I've done in the past.

answered 2011-04-10T22:36:55.770

Your Answer