//
// 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 ImageSharp.Processing;
using Xunit;
public class FlipTests : FileTestBase
{
public static readonly string[] FlipFiles = { TestImages.Bmp.F };
public static readonly TheoryData FlipValues
= new TheoryData
{
{ FlipType.None },
{ FlipType.Vertical },
{ FlipType.Horizontal },
};
[Theory]
[WithFileCollection(nameof(FlipFiles), nameof(FlipValues), DefaultPixelType)]
public void ImageShouldFlip(TestImageProvider provider, FlipType flipType)
where TPixel : struct, IPixel
{
using (Image image = provider.GetImage())
{
image.Mutate(x => x.Flip(flipType));
image.DebugSave(provider, flipType, Extensions.Bmp);
}
}
}
}