예제 #1
0
        public void BoxFilter_Is_Applied()
        {
            foreach (FileInfo file in TestImages.GetTestImagesFromTestFolder(""))
            {
                string outputFileName = $"{OutputPath}{file.Name.Substring(0, file.Name.LastIndexOf('.'))}";

                using (var imageLoader = new ImageLoader())
                {
                    imageLoader.Load(file.FullName);
                    Image  image    = imageLoader.Image;
                    string fileName = $"{outputFileName}_boxFilter{file.Extension}";

                    imageLoader.AddBoxFilter(5);
                    imageLoader.Save(fileName);

                    Assert.IsTrue(File.Exists(fileName));
                    ImageAssert.AssertImagesAreDifferent(image, imageLoader.Image);
                }
            }
        }