예제 #1
0
        public async Task ApplyFilters(ImageFilter filter, string filterName)
        {
            using (var img = new BitmapImage(TestData.GetZebraImage()))
            {
                await filter.Apply(img, img.Bounds, CancellationToken.None);

                await img.SaveAsync(File.Create(Path.Combine(TestData.RootFolder, $"zebra-{filterName}.png")), CancellationToken.None);
            }
        }
예제 #2
0
        public async Task ApplySepiaFilter(int w, int h)
        {
            using (var img = new BitmapImage(TestData.GetTestImage(w, h)))
            {
                await Filter.Apply(img, img.Bounds, CancellationToken.None);

                await img.SaveAsync(File.Create(Path.Combine(TestData.RootFolder, $"sepia-{w}x{h}.png")), CancellationToken.None);
            }
        }