mirror of
https://github.com/AssetRipper/AssetRipper.TextureDecoder.git
synced 2026-11-13 04:26:30 -10:00
21 lines
738 B
C#
21 lines
738 B
C#
using AssetRipper.TextureDecoder.Rgb.Formats;
|
|
using AssetRipper.TextureDecoder.Yuy2;
|
|
|
|
namespace AssetRipper.TextureDecoder.Tests
|
|
{
|
|
public sealed class Yuy2Tests
|
|
{
|
|
private const int TestImageWidth = 256;
|
|
private const int TestImageHeight = 256;
|
|
|
|
[Test]
|
|
public void DecompressYUY2Test()
|
|
{
|
|
byte[] input = File.ReadAllBytes(PathConstants.Yuy2TestFilesFolder + "test.yuy2");
|
|
int bytesRead = Yuy2Decoder.DecompressYUY2(input, TestImageWidth, TestImageHeight, out byte[] originalOutput);
|
|
Assert.That(bytesRead, Is.EqualTo(input.Length));
|
|
Yuy2Decoder.DecompressYUY2<ColorBGRA32, byte>(input, TestImageWidth, TestImageHeight, out byte[] genericOutput);
|
|
Assert.That(originalOutput, Is.EqualTo(genericOutput));
|
|
}
|
|
}
|
|
} |