Beispiel #1
0
 /// <summary>
 /// Finds the smallest and largest X and Y coordinates of the pixels whose alpha channel exceeds the specified threshold.
 /// </summary>
 public PixelRect PreciseSize(int alphaThreshold = 0)
 {
     using (UseRead())
     {
         int left   = PreciseLeft(alphaThreshold);
         int right  = PreciseRight(alphaThreshold);
         int top    = PreciseTop(alphaThreshold, left, right + 1);
         int bottom = PreciseBottom(alphaThreshold, left, right + 1);
         return(PixelRect.FromBounds(left, top, right, bottom));
     }
 }