private void NewImageButton_Click(object sender, EventArgs e)
        {
            _jazzImage = new JazzImageDefinition(IMAGE_WIDTH, IMAGE_HEIGHT);

            RenderPicture.Image = _jazzImage.GetResultingImageThreaded();

            EnableAllButtons();
        }
        private void SaveBunchButton_Click(object sender, EventArgs e)
        {
            while (true)
            {
                _jazzImage = new JazzImageDefinition(IMAGE_WIDTH, IMAGE_HEIGHT);
                Image frame = _jazzImage.GetResultingImageThreaded();
                //Image frame = _jazzImage.GetResultingImage();

                string filename = GetNextFilename();

                while (filename == null)
                {
                    Thread.Sleep(10000);
                    filename = GetNextFilename();
                }

                frame.Save(filename, System.Drawing.Imaging.ImageFormat.Png);

                Image thumbnail = frame.GetThumbnailImage(frame.Width / 4, frame.Height / 4, null, new IntPtr());
                thumbnail.Save(filename.Split('.')[0] + "_thumb.png");

                Thread.Sleep(1000);
            }
        }