Android程序开发之动态设置ImageView的亮度
废话不多说了,直接给大家贴代码了。 //改变图片的亮度方法 0--原样 >0---调亮 <0---调暗 private void changeLight(ImageView imageView, int brightness) { ColorMatrix cMatrix = new ColorMatrix(); cMatrix.set(new float[] { 1, 0, 0, 0, brightness, 0, 1, 0, 0, brightness,// 改变亮度 0, 0, 1, 0, brightness, 0, 0, 0
下载地址
用户评论