public void DisplaySpectrogram(string filePath) { // analyser = new ShortTimeFourierTransform(filePath, double.Parse(fResolutionTxt.Text), double.Parse(timeStepTxt.Text)); analyser = new ShortTimeFourierTransform(filePath, int.Parse(fftSizeTxt.Text), double.Parse(timeStepTxt.Text)); spectrogram = new RainbowSpectrogram(analyser, int.Parse(textBox1.Text)); analyser.Ended += OnEnded; OriginalBitmap = spectrogram.Generate(); pictureBox1.Image = (Bitmap)OriginalBitmap.Bitmap.Clone(); }