for (int x = 0; x < blockCountX; x++)
{
for (int y = 0; y < blockCountY; y++)
image.Scan0 if you don't have any restriction about unsafe operations.Parallel.ForEach for such usages. If you can't use it, you can use thread pools. I guess your computer does not have (2048 x 2048) / (256 x 256) = 64 core CPU.