while (h < bd1.Height && h < bd2.Height)
{
byte* p1 = (byte*)bd1.Scan0 + h * bd1.Stride;
byte* p2 = (byte*)bd2.Scan0 + h * bd2.Stride;
w = 0;
while (w < bd1.Width && w < bd2.Width)
{
//按块大小进行扫描
for (int i = 0; i < block.Width; i++)
{
int wi = w + i;
if (wi >= bd1.Width || wi >= bd2.Width) break;
for (int j = 0; j < block.Height; j++)
{
int hj = h + j;
if (hj >= bd1.Height || hj >= bd2.Height) break;