我在我的应用程序中包括一个照片编辑器,到目前为止,我已经解决了亮度和对比度选项。但是我不知道热设置曝光的颜色矩阵和值是什么。
亮度:-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
}); 这两个工作,但我不知道什么是什么颜色矩阵的曝光。我在一个主题中发现,它与对比是相等的,但这不是真的。
发布于 2015-05-27 12:58:55
我发现它的值可以在-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
});这里是亮度/contrast
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
});https://stackoverflow.com/questions/30458112
复制相似问题