Ejemplo n.º 1
0
        public void TestLeftToRightRGB()
        {
            var bun = ImageFactory.GenerateRgb(BunnyPath);

            ImageFunctions.LeftToRight(bun, bun, bun)
            .WriteImage(Path.Combine(WorkingDirectory, "LeftToRightRGB"));
        }
Ejemplo n.º 2
0
        public void TestTopToBottomRGB()
        {
            var bun = ImageFactory.GenerateRgb(BunnyPath);

            ImageFunctions.TopToBottom(bun, bun, bun)
            .WriteImage(Path.Combine(WorkingDirectory, "TopToBottomRGB"));
        }
Ejemplo n.º 3
0
        public void TestGenerateRgb()
        {
            // RGB Image
            var img = ImageFactory.GenerateRgb(BunnyPath);

            Assert.IsFalse(ImageEmpty(img));
        }
Ejemplo n.º 4
0
        public void TestHSLConversion()
        {
            IImage <RGB> rgb         = ImageFactory.GenerateRgb(BunnyPath);
            IImage <RGB> rgb2hsl2rgb = rgb.ToHsl().ToRgb();

            // Check for minimal loss due to conversion
            ImagesEqualWithinEpsilon(rgb, rgb2hsl2rgb, (a, b) => WithinEpsilon(0.05, a, b));
        }
Ejemplo n.º 5
0
        public void TestMatrixProductRGB()
        {
            var bun = ImageFactory.GenerateRgb(ImageTests.BunnyPath);

            Assert.IsFalse(ImageEmpty(bun));

            bun.Multiply(bun)
            .WriteImage(Path.Combine(WorkingDirectory, "Matrix Product RGB"));
        }
Ejemplo n.º 6
0
        public void AddSubtractRgb()
        {
            IImage <RGB> bunny    = ImageFactory.GenerateRgb(BunnyPath);
            IImage <RGB> added    = ImageFunctions.Add(bunny, bunny);
            IImage <RGB> original = ImageFunctions.Subtract(added, bunny);

            // bunny + bunny - bunny == bunny
            Assert.IsTrue(ImagesEqual(bunny, original));
        }
Ejemplo n.º 7
0
        public void TestRGBImageCrop()
        {
            IImage <RGB> image = ImageFactory.GenerateRgb(BunnyPath);

            int dimensions = Math.Min(image.Width, image.Height);

            image.Crop(0, 0, dimensions, dimensions / 2)
            .WriteImage(Path.Combine(WorkingDirectory, "RGB Bun Crop"));
        }
Ejemplo n.º 8
0
        public void TestRGBImageCropRectangle()
        {
            IImage <RGB> image = ImageFactory.GenerateRgb(BunnyPath);

            int dimensions = Math.Min(image.Width, image.Height / 2);

            image.Crop(new System.Drawing.Rectangle()
            {
                Height = dimensions, Width = dimensions
            })
            .WriteImage(Path.Combine(WorkingDirectory, "RGB Bun Crop Rectangle"));
        }
Ejemplo n.º 9
0
 public void TestRgbTransforms()
 {
     this.Transforms(ImageFactory.GenerateRgb(BunnyPath));
 }
Ejemplo n.º 10
0
        public void RgbDataIEnumerable()
        {
            IImage <RGB> img = ImageFactory.GenerateRgb(BunnyPath);

            TestIEnumerable(img);
        }
Ejemplo n.º 11
0
 public void TestEquivalenceRgb()
 {
     Equivalence(ImageFactory.GenerateRgb(BunnyPath));
 }
Ejemplo n.º 12
0
 public void TestSaveRGBImage()
 {
     ImageFactory.GenerateRgb(BunnyPath)
     .WriteImage(WorkingDirectory, "Bun RGB");
 }
Ejemplo n.º 13
0
        public void TestCopyRgb()
        {
            var img = ImageFactory.GenerateRgb(BunnyPath);

            TestCopyGeneric(img);
        }
Ejemplo n.º 14
0
        public void RgbDataConsistency()
        {
            IImage <RGB> img = ImageFactory.GenerateRgb(BunnyPath);

            TestDataConsistency(img);
        }
Ejemplo n.º 15
0
        public void RgbIDisposable()
        {
            IImage <RGB> img = ImageFactory.GenerateRgb(BunnyPath);

            TestIDisposable(img);
        }
Ejemplo n.º 16
0
 public void TestAddRgb()
 {
     ImageFactory.GenerateRgb(50, 50).Add(default(RGB));
 }
Ejemplo n.º 17
0
 public void TestRemoveRgb()
 {
     ImageFactory.GenerateRgb(50, 50).Remove(default(RGB));
 }
Ejemplo n.º 18
0
 public void TestIsReadOnlyRgb()
 {
     Assert.IsTrue(ImageFactory.GenerateRgb(50, 50).IsReadOnly);
 }
Ejemplo n.º 19
0
        public void RgbDataICollection()
        {
            IImage <RGB> img = ImageFactory.GenerateRgb(BunnyPath);

            TestICollection(img);
        }
Ejemplo n.º 20
0
 public void TestClearRgb()
 {
     ImageFactory.GenerateRgb(50, 50).Clear();
 }
Ejemplo n.º 21
0
 public void TestModifyRgb()
 {
     TestModify(ImageFactory.GenerateRgb(BunnyPath));
 }
Ejemplo n.º 22
0
 public void TestIsSynchronizedRgb()
 {
     Assert.IsFalse(ImageFactory.GenerateRgb(50, 50).IsSynchronized);
 }