How to draw a bitmap with a given color set as transparent?
For example I want all white pixels to be transparent.
You need to set the Alpha value for the paint you're passing to the Bitmap.
http://developer.android.com/reference/android/graphics/Paint.html#setAlpha%28int%29
Values vary from 0-255
EDIT:
Paint p = new Paint();
//Set Blue Color
p.setColor(Color.WHITE);
//Set transparency roughly at 50%
p.setAlpha(125);
you need to check every pixel of image and change its color. you will get your answer in this Post
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With