Browse Source

Add test case for pxr24 compressed image

pull/3124/head
Brian Popow 3 weeks ago
parent
commit
d805b9b50c
  1. 10
      tests/ImageSharp.Tests/Formats/Exr/ExrDecoderTests.cs
  2. 1
      tests/ImageSharp.Tests/TestImages.cs
  3. 3
      tests/Images/Input/Exr/Calliphora_half_pxr24.exr

10
tests/ImageSharp.Tests/Formats/Exr/ExrDecoderTests.cs

@ -119,6 +119,16 @@ public class ExrDecoderTests
image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder);
}
[Theory]
[WithFile(TestImages.Exr.Pxr24Half, PixelTypes.Rgba32)]
public void ExrDecoder_CanDecode_Pxr24Compressed<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(ExrDecoder.Instance);
image.DebugSave(provider);
image.CompareToOriginal(provider, ImageComparer.Exact, ReferenceDecoder);
}
[Theory]
[WithFile(TestImages.Exr.B44, PixelTypes.Rgba32)]
public void ExrDecoder_CanDecode_B44Compressed<TPixel>(TestImageProvider<TPixel> provider)

1
tests/ImageSharp.Tests/TestImages.cs

@ -1395,6 +1395,7 @@ public static class TestImages
public const string Zips = "Exr/Calliphora_zips.exr";
public const string Rle = "Exr/Calliphora_rle.exr";
public const string B44 = "Exr/Calliphora_b44.exr";
public const string Pxr24Half = "Exr/Calliphora_half_pxr24.exr";
public const string Rgb = "Exr/Calliphora_rgb.exr";
public const string Gray = "Exr/Calliphora_gray.exr";
}

3
tests/Images/Input/Exr/Calliphora_half_pxr24.exr

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:927778a73832b5ad68473e46df6be52076d98294271f2cd0ead66691db41b7bf
size 195063
Loading…
Cancel
Save