Android 位图曝光
Android bitmap exposure
我在我的应用程序中加入了一个照片编辑器,到目前为止我已经解决了亮度和对比度选项。但是我不知道设置曝光的颜色矩阵以及值是多少。
亮度:介于 -255 和 255 之间的值
颜色矩阵
ColorMatrix brightnessCM= new ColorMatrix(new float[]
{
1, 0, 0, 0,brightness,
0, 1, 0, 0,brightness,
0, 0, 1, 0,brightness,
0, 0, 0, 1,0
});
对比度:介于 0 和 1 之间的值
颜色矩阵:
ColorMatrix contrastCM = new ColorMatrix(new float[]
{
contrast, 0, 0, 0,0,
0, contrast, 0, 0,0,
0, 0, contrast, 0,0,
0, 0, 0, 1,0
});
这 2 个工作,但我不知道曝光的颜色矩阵是什么。
我在一个题目中发现它是equal with contrast 但不是真的
我找到了
值可以在 -1 和 1 之间
float pow = (float) Math.pow(2,value);
ColorMatrix exposureMatrix= new ColorMatrix(new float[]
{
pow, 0, 0, 0, 0,
0, pow, 0, 0, 0,
0, 0, pow,0,0,
0, 0, 0, 1,0
});
这里是亮度/对比度
ColorMatrix cm = new ColorMatrix(new float[]
{
contrast, 0, 0, 0, brightness,
0, contrast, 0, 0, brightness,
0, 0, contrast, 0, brightness,
0, 0, 0, 1, 0
});
我在我的应用程序中加入了一个照片编辑器,到目前为止我已经解决了亮度和对比度选项。但是我不知道设置曝光的颜色矩阵以及值是多少。
亮度:介于 -255 和 255 之间的值
颜色矩阵
ColorMatrix brightnessCM= new ColorMatrix(new float[]
{
1, 0, 0, 0,brightness,
0, 1, 0, 0,brightness,
0, 0, 1, 0,brightness,
0, 0, 0, 1,0
});
对比度:介于 0 和 1 之间的值
颜色矩阵:
ColorMatrix contrastCM = new ColorMatrix(new float[]
{
contrast, 0, 0, 0,0,
0, contrast, 0, 0,0,
0, 0, contrast, 0,0,
0, 0, 0, 1,0
});
这 2 个工作,但我不知道曝光的颜色矩阵是什么。 我在一个题目中发现它是equal with contrast 但不是真的
我找到了 值可以在 -1 和 1 之间
float pow = (float) Math.pow(2,value);
ColorMatrix exposureMatrix= new ColorMatrix(new float[]
{
pow, 0, 0, 0, 0,
0, pow, 0, 0, 0,
0, 0, pow,0,0,
0, 0, 0, 1,0
});
这里是亮度/对比度
ColorMatrix cm = new ColorMatrix(new float[]
{
contrast, 0, 0, 0, brightness,
0, contrast, 0, 0, brightness,
0, 0, contrast, 0, brightness,
0, 0, 0, 1, 0
});