How to adjust Brightness and Contrast of an image using a slider?
问题 I have an image and i want to adjust its brightness and contrast through a slider in xaml. I don't know where to start.Any help would be appreciated. I am trying to implement this public WriteableBitmap ChangeBrightness(WriteableBitmap inputBitmap, double brightnessValue ) { double Value = brightnessValue; var inputPixels = inputBitmap.Pixels; for (int i = 0; i < inputPixels.Length; i++) { // Extract color components var c = inputBitmap.Pixels[i]; var a = (byte)(c >> 24); var r = (byte)(c >>