public static Func <Color, Color> TransformSaturation(int strenght) { return((Color rgbColor) => { HsvColor hsvColor = HsvRgbColorConverter.ConvertRgbToHsv(rgbColor); double floatingPointStrenght = (double)strenght / 100; hsvColor.S += floatingPointStrenght; return HsvRgbColorConverter.ConvertHsvToRgb(hsvColor); }); }
public int[] GetVLelevs() { int[] vLevels = new int[256]; for (int i = 0; i < CurrentlyEditedBitmap.Height; i++) { for (int j = 0; j < CurrentlyEditedBitmap.Width; j++) { HsvColor hsvColor = HsvRgbColorConverter.ConvertRgbToHsv(CurrentlyEditedBitmap.GetPixel(j, i)); vLevels[hsvColor.V]++; } } return(vLevels); }