Min() public static method

Computes the minimum pixel value in the given image.
public static Min ( this image ) : int
image this
return int
コード例 #1
0
        public void MinTest2()
        {
            Bitmap image = new byte[, ]
            {
                { 5, 2, 7 },
                { 5, 3, 5 },
                { 9, 1, 2 }
            }.ToBitmap();

            {
                Rectangle rectangle = new Rectangle(1, 0, 2, 2);
                int       expected  = 2;
                int       actual    = Tools.Min(image, rectangle);
                Assert.AreEqual(expected, actual);
            }
            {
                int expected = 1;
                int actual   = Tools.Min(image);
                Assert.AreEqual(expected, actual);
            }
        }