it must be immensely slow if it's using GetPixel. Rewrite to it is using pointers (assuming C# here)