当前位置:   article > 正文

C# 使用ColorMatrix时各种效果的参数_c# colormatrix

c# colormatrix


1、去色效果
private float[] colorArray=new float[]{
1.5f,1.5f,1.5f,0,-1,
1.5f,1.5f,1.5f,0,-1,
1.5f,1.5f,1.5f,0,-1,
0,0,0,1,0,
0,0,0,0,0
};

2、怀旧效果
private float[] colorArray=new float[]{
0.393,0.769,0.189,0,0,
0.349,0.686,0.168,0,0,
0.272,0.543,0.131,0,0,
0,0,0,1,0,
0,0,0,0,0
};

3、图片反转效果
private float[] colorArray=new float[]{
-1,0,0,1,1,
0,-1,0,1,1,
0,0,-1,1,1,
0,0,0,1,0,
0,0,0,0,0
};

4、灰度效果
private float[] colorArray=new float[]{
0.33,0.59,0.11,0,0,
0.33,0.59,0.11,0,0,
0.33,0.59,0.11,0,0,
0,0,0,1,0,
0,0,0,0,0
};

5、高饱和度效果
private float[] colorArray=new float[]{
1.438,-0.122,-0.016,0,-0.03,
-0.062,1.378,-0.016,0,0.05,
-0.062,-0.122,1.483,0,-0.02,
0,0,0,1,0,
0,0,0,0,0
};

6、低饱和度效果
private float[] colorArray=new float[]{
0.308,0.609,0.082,0,0,
0.308,0.609,0.082,0,0,
0.308,0.609,0.082,0,0,
0,0,0,1,0,
0,0,0,0,0
};

7、亮度调整
private float[] colorArray=new float[]{
1,0,0,0,0,
0,1,0,0,0,
0,0,1,0,0,
0,0,0,1,0,
light,light,light,0,0
};

8、对比度调整
private float[] colorArray=new float[]{
contrast ,0,0,0,0,
0,contrast ,0,0,0,
0,0,contrast ,0,0,
0,0,0,1,0,
0,0,0,0,0
};

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/257636
推荐阅读
相关标签
  

闽ICP备14008679号