public void TestSinglePixel() { var testset = new Pix(@"Tests\Barcode_Test01_linesedges_100_101.bmp"); var result = testset.GetPixel(0, 0); Assert.IsTrue(StructuralComparisons.StructuralEqualityComparer.Equals(result, new byte[] { 104, 104, 104 })); result = testset.GetPixel(0, 1); Assert.IsTrue(StructuralComparisons.StructuralEqualityComparer.Equals(result, new byte[] { 108, 108, 108 })); result = testset.GetPixel(0, 2); Assert.IsTrue(StructuralComparisons.StructuralEqualityComparer.Equals(result, new byte[] { 60, 0, 180 })); }
public void TestSinglePixel_PNG() { var testset = new Pix(@"Tests\Pocorgtfo12-53_24bit.png"); var result = testset.GetPixel(0, 0); var expected = Enumerable.Range(0, testset.BytesPerPixel).Select(x => (byte)(255)).ToArray(); Assert.IsTrue(StructuralComparisons.StructuralEqualityComparer.Equals(expected, result)); }