Ejemplo n.º 1
0
        public void TestPCXImageLoading24RLE()
        {
            var image = new PCXDecoder(PCX24RLE).PcxImage;

            for (int x = 0; x < image.Width; x++)
            {
                for (int y = 0; y < image.Height; y++)
                {
                    if ((x == 0 && (y % 2) == 0) || (y == 0 && (x % 2) == 0))
                    {
                        Assert.AreEqual(0, image.GetPixel(x, y).R);
                        Assert.AreEqual(0, image.GetPixel(x, y).G);
                        Assert.AreEqual(0, image.GetPixel(x, y).B);
                    }
                    else
                    {
                        Assert.AreEqual(255, image.GetPixel(x, y).R);
                        Assert.AreEqual(255, image.GetPixel(x, y).G);
                        Assert.AreEqual(255, image.GetPixel(x, y).B);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void TestPCXImageLoading8RLE()
        {
            var image = new PCXDecoder(PCX8RLE).PcxImage;

            for (int x = 0 ; x < image.Width ; x++)
            {
                for (int y = 0 ; y < image.Height ; y++)
                {
                    if ((x == 0 && (y % 2) == 0) || (y == 0 && (x % 2) == 0))
                    {
                        Assert.AreEqual(0, image.GetPixel(x, y).R);
                        Assert.AreEqual(0, image.GetPixel(x, y).G);
                        Assert.AreEqual(0, image.GetPixel(x, y).B);
                    }
                    else
                    {
                        Assert.AreEqual(255, image.GetPixel(x, y).R);
                        Assert.AreEqual(255, image.GetPixel(x, y).G);
                        Assert.AreEqual(255, image.GetPixel(x, y).B);
                    }
                }
            }
        }