Exemplo n.º 1
0
 void blenderCurvesChanged(object sender, byte[] c1, byte[] c2, byte[] c3)
 {
     var te = _viewerData.Blender.BlendTable;
     for (var i = 0; i < 256; i++)
         te[i] = new Blender.TableEntry()
         {
             Mask = c1[i] / 255f,
             GreenExtract = c2[i] / 255f,
             Foreground = c3[i] / 255f
         };
     _viewerData.Blend();
     (Owner as FMain).SetImage(_viewerData.Result);
 }
Exemplo n.º 2
0
 private void btnApply_Click(object sender, EventArgs e)
 {
     var z = _x[_checkedButtonIndex];
     var bend1 = (double) numBendBlend.Value / 10;
     var bend2 = (double)numBendGreen.Value / 10;
     for (var i = 0; i < 256; i++)
     {
         var te = new Blender.TableEntry(i, (int)numKnee.Value, bend1, bend2);
         z[0][i] = (byte)Math.Round(te.Mask * 255);
         z[1][i] = (byte)Math.Round(te.GreenExtract * 255);
         z[2][i] = (byte)Math.Round(te.Foreground * 255);
     }
     btnClick(_checkedButtonIndex);
 }