Esempio n. 1
0
 private void UpdateColor(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "Update")
     {
         PointTransformation.AddValue(_directBitmap, Channel.Red, _colorBalanceWindow.Red);
         PointTransformation.AddValue(_directBitmap, Channel.Green, _colorBalanceWindow.Green);
         PointTransformation.AddValue(_directBitmap, Channel.Blue, _colorBalanceWindow.Blue);
         ImageCanvas.Source = BitmapConverter.GetBitmapSource(_directBitmap.Bitmap);
     }
     else if (e.PropertyName == "RedMultiplier" || e.PropertyName == "GreenMultiplier" || e.PropertyName == "BlueMultiplier")
     {
         PointTransformation.MultiplyByValue(_directBitmap, Channel.Red, _colorBalanceWindow.RedMultiplier);
         PointTransformation.MultiplyByValue(_directBitmap, Channel.Green, _colorBalanceWindow.GreenMultiplier);
         PointTransformation.MultiplyByValue(_directBitmap, Channel.Blue, _colorBalanceWindow.BlueMultiplier);
         ImageCanvas.Source = BitmapConverter.GetBitmapSource(_directBitmap.Bitmap);
     }
 }