CaptchaRecogition.ImageProcess.GetEndBoundaryY C# (CSharp) 메소드

GetEndBoundaryY() 개인적인 정적인 메소드

Y轴结束的边界
private static GetEndBoundaryY ( Image img, int start ) : int
img Image
start int
리턴 int
        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;
        }