public void ProcessImage(Bitmap i_ImageBeforeProcessing = null) { if (GenerateNewProcessedImageThread != null && GenerateNewProcessedImageThread.ThreadState == ThreadState.Running) { GenerateNewProcessedImageThread.Abort(); } ShowLoading.Invoke(); GenerateNewProcessedImageThread = new Thread(() => ImageManipulationConvolver.Convolve(KernelHeight, KernelWidth, CurrentKernel, i_ImageBeforeProcessing)); GenerateNewProcessedImageThread.Start(); }