コード例 #1
0
ファイル: PixelTest.cs プロジェクト: tropensturm/OscarNET
        public void TestSingleBit()
        {
            var testset = new Pix(@"Tests\Barcode_Test01_linesedges_100_101.bmp");

            var result = testset.GetBit(0, 0);

            Assert.AreEqual(104, (int)result);

            result = testset.GetBit(0, 1);
            Assert.AreEqual(108, (int)result);

            result = testset.GetBit(0, 2);
            Assert.AreEqual(60, (int)result);

            result = testset.GetBit(2, 2);
            Assert.AreEqual(180, (int)result);

            result = testset.GetBit((798 * 3) + 2, 2);
            Assert.AreEqual(60, (int)result);
        }