Android apply colorMatrix colorFilter on part of imageView with a mask
问题 I want to change the brightness on certain part of an image. I know how to use ColorMatrix to change the brightness(or hue) of an image. But it will be applied to the whole image. I have a mask file (black and white image). I want to apply the brightness change only on the the white part of that mask.How to do this in Android? Below is a mask image and the result I want to get. 回答1: for given bitmap and mask: first create a temporary bitmap: bitmap = BitmapFactory.decodeResource(ctx