Esempio n. 1
0
        public void GaussFilter_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}_gaussFilter{file.Extension}";

                    imageLoader.AddGaussFilter(5, 1.4);
                    imageLoader.Save(fileName);

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