image – How do you tint a bitmap in Android?-ThrowExceptions

Exception or error:

I draw a bitmap onto a canvas using the following call:

_playerImage = BitmapFactory.decodeResource(getResources(), R.drawable.player);

How can I now tint this image white?
I’m trying to make the image flash white like in top-scrollers when an enemy is hit by a bullet.

Do I need to use something other than BitmapFactory?

How to solve:

You can use a ColorFilter on your Paint when you draw the bitmap.

Leave a Reply

Your email address will not be published. Required fields are marked *