Algorithmix.Preprocessing.Preprocessing.FindBottomTransparent C# (CSharp) Метод

FindBottomTransparent() публичный статический Метод

Find the bottow row with non-transparent pixels
public static FindBottomTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image the image to find the last row with non-transparent pixels
Результат int
        public static int FindBottomTransparent(Image<Bgra, Byte> myImg)
        {
            for (int ii = myImg.Rows - 1; ii >= 0; ii--)
            {
                for (int jj = 0; jj < myImg.Cols; jj++)
                {
                    if (myImg[ii, jj].Alpha > 55)
                    {
                        return ii;
                    }
                }
            }
            return 0;
        }