//
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
//
namespace ImageSharp.Tests.Processing.Processors.Transforms
{
using ImageSharp.PixelFormats;
using Xunit;
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);
}
}
}
}