📷 A modern, cross-platform, 2D Graphics library for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
943 B

// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Tests.Formats.Qoi;
[Trait("Format", "Qoi")]
[ValidateDisposedMemoryAllocations]
public class QoiDecoderTests
{
[Theory]
[InlineData(TestImages.Qoi.Dice)]
[InlineData(TestImages.Qoi.EdgeCase)]
[InlineData(TestImages.Qoi.Kodim10)]
[InlineData(TestImages.Qoi.Kodim23)]
[InlineData(TestImages.Qoi.QoiLogo)]
[InlineData(TestImages.Qoi.TestCard)]
[InlineData(TestImages.Qoi.TestCardRGBA)]
[InlineData(TestImages.Qoi.Wikipedia008)]
public void Identify(string imagePath)
{
TestFile testFile = TestFile.Create(imagePath);
using MemoryStream stream = new(testFile.Bytes, false);
ImageInfo imageInfo = Image.Identify(stream);
Assert.NotNull(imageInfo);
Assert.Equal(imageInfo.Metadata.DecodedImageFormat, ImageSharp.Formats.Qoi.QoiFormat.Instance);
}
}