/// <summary>
        /// Oblicza i zapisuje histogramy do zmiennych typu SeriesCollection, wywoływana przy załadowaniu okna
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoadHistograms(object sender, RoutedEventArgs e)
        {
            int[] rHistogramValues, gHistogramValues, bHistogramValues, brightnessHistogramValues;
            (rHistogramValues, gHistogramValues, bHistogramValues, brightnessHistogramValues) = BitmapSource.Histogram();

            CollectionR.Add(new LineSeries
            {
                Values         = new ChartValues <int>(rHistogramValues),
                LineSmoothness = 0
            });
            CollectionG.Add(new LineSeries
            {
                Values         = new ChartValues <int>(gHistogramValues),
                LineSmoothness = 0
            });
            CollectionB.Add(new LineSeries
            {
                Values         = new ChartValues <int>(bHistogramValues),
                LineSmoothness = 0
            });
            CollectionBrightness.Add(new LineSeries
            {
                Values         = new ChartValues <int>(brightnessHistogramValues),
                LineSmoothness = 0
            });
        }