问题描述
我要添加图像的光,我想用 LightingColorFilter
LightingColorFilter LCF =新LightingColorFilter(MUL,补充);
imageView.setColorFilter(LCF);
但我不知道如何调整 MUL,添加
,你可以提供一些链接或code或参数来调整图像的光
感谢您
的整数值是颜色(你可能想仔细看看这里http://developer.android.com/reference/android/graphics/Color.html)
4个字节被使用,一个用于α,一个用于红色,一个用于绿色,一个用于蓝色范围 - 的每一个从0到255(十六进制为0〜FF)
因此,在十六进制的颜色看起来像
0 X 00 00 00 00
阿尔法红,绿,蓝
如果你想例如红色设置为零,使用
MUL:0xFF00FFFF
加:00000000
如果要强制蓝色是全对,用
MUL值:0xFFFFFFFF
地址:0x000000FF
I want to add light of the image, I want to use LightingColorFilter
LightingColorFilter lcf = new LightingColorFilter( mul, add);
imageView.setColorFilter(lcf);
but I don't know how to adjust mul, add
, can you give some link or code or parameters to adjust the light of the image?
Thank you
The integer values are colours (you may want to have a closer look here http://developer.android.com/reference/android/graphics/Color.html)
4 Bytes are used, one for alpha, one for red, one for green, one for blue range - every single from 0 to 255 (hex 0 to FF)
so the colour in hex looks like
0 x 00 00 00 00
alpha red green blue
If you want to set for example red to zero, use
mul: 0xFF00FFFF
add: 0x00000000
If you want to force blue to be full-on, use
mul: 0xFFFFFFFF
add: 0x000000FF
这篇关于如何使用LightingColorFilter使图像形式暗到亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!