// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using SixLabors.ImageSharp.Formats; using SixLabors.ImageSharp.PixelFormats; using Xunit; // ReSharper disable InconsistentNaming namespace SixLabors.ImageSharp.Tests { using SixLabors.ImageSharp.Formats.Bmp; public class BmpDecoderTests : FileTestBase { [Theory] [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgb24)] public void DecodeBmp(TestImageProvider provider) where TPixel : struct, IPixel { using (Image image = provider.GetImage(new BmpDecoder())) { image.DebugSave(provider, "bmp"); image.CompareToOriginal(provider); } } [Theory] [WithFile(TestImages.Bmp.F, CommonNonDefaultPixelTypes)] public void BmpDecoder_IsNotBoundToSinglePixelType(TestImageProvider provider) where TPixel : struct, IPixel { using (Image image = provider.GetImage(new BmpDecoder())) { image.DebugSave(provider, "bmp"); image.CompareToOriginal(provider); } } } }