// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using SixLabors.ImageSharp.PixelFormats; using Xunit; namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms { using SixLabors.ImageSharp.Processing; public class EntropyCropTest : FileTestBase { public static readonly TheoryData EntropyCropValues = new TheoryData { .25F, .75F }; [Theory] [WithFileCollection(nameof(DefaultFiles), nameof(EntropyCropValues), DefaultPixelType)] public void ImageShouldEntropyCrop(TestImageProvider provider, float value) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) { image.Mutate(x => x.EntropyCrop(value)); image.DebugSave(provider, value); } } } }