public static FindBottomTransparent ( Byte>.Image |
||
myImg | Byte>.Image | the image to find the last row with non-transparent pixels |
Résultat | 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;
}