I want to create a bitmap from a drawable, which is in res/drawables.

I know I should use BitmapFactory to do that, something like:

Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.filename)

as written here:
http://developer.android.com/reference/android/graphics/BitmapFactory.html#decodeResource(android.content.res.Resources,
int)


The fact is that it seems it doesn't find the drawable at all!

Can this be a context problem? Seems like it doesn't recognize any of
the drawables in res/drawables.

Please help!

I need to put images on a canvas in a Live Wallpaper!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to