Processing an image using multiple threads is something difficult in .NET with C# because GDI+ instances are not prepared for multithreaded access. Nevertheless, we could create self-sufficient blocks of safe concurrent code dividing the image into many independent images and adding a results collector.
This principle is the simplest way to transform a single-threaded algorithm into a multithreaded algorithm avoiding many complex problems related to concurrency.
Each thread works in its independent block, without disturbing or interfering with the other threads.
However, the code used for dividing the original bitmap dynamically into many smaller bitmaps is a bit complex. That is the price we have ...