Algorithmix.Preprocessing.Preprocessing.FindLeftTransparent C# (CSharp) Method

FindLeftTransparent() public static method

Find the leftmost column with non-transparent pixels
public static FindLeftTransparent ( Byte>.Image myImg ) : int
myImg Byte>.Image the image to find the first column with non-transparent pixels
return int
        public static int FindLeftTransparent(Image<Bgra, Byte> myImg)
        {
            for (int ii = 0; ii < myImg.Cols; ii++)
            {
                for (int jj = 0; jj < myImg.Rows; jj++)
                {
                    if (myImg[jj, ii].Alpha > 55)
                    {
                        return ii;
                    }
                }
            }
            return 0;
        }