Change color of non-transparent parts of png in Java

前端 未结 3 1335
遥遥无期
遥遥无期 2021-01-31 11:17

I am trying to automatically change the color for a set of icons. Every icon has a white filled layer and the other part is transparent. Here is an example: (in this case it\'s

3条回答
  •  野性不改
    2021-01-31 11:40

    If your bitmap is already set in an ImageView, just do :

    imageView.setColorFilter(Color.RED);
    

    to set all non transparent pixels to red.

提交回复
热议问题