// 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 { public class CropTest : FileTestBase { [Theory] [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldCrop(TestImageProvider provider) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) { image.Mutate(x => x.Crop(image.Width / 2, image.Height / 2)); image.DebugSave(provider); } } } }