private static int GetEndBoundaryY(Image img, int start)
{
Bitmap bmp = new Bitmap(img);
int endB = 0;
for (int i = start; i < bmp.Width; i++)
{
int cnt = 0;
for (int j = 0; j < bmp.Height; j++)
{
//遍历各个像素,获得bmp位图每个像素的RGB对象
Color pixelColor = bmp.GetPixel(i, j);
//TODO:全白
if (pixelColor.Name == "ffffffff")
{
cnt++;
continue;
}
else
break;
}
if (bmp.Height -2<=cnt&&cnt <= bmp.Height)
{
endB = i;
break;
}
}
return endB;
}