Browse Source

Add test image for decoding exr with float piyel type

pull/3096/head
Brian Popow 2 months ago
parent
commit
1abfe6966d
  1. 12
      tests/ImageSharp.Tests/Formats/Exr/ExrDecoderTests.cs
  2. 1
      tests/ImageSharp.Tests/TestImages.cs
  3. 3
      tests/Images/Input/Exr/rgb_float32_uncompressed.exr

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

@ -27,7 +27,17 @@ public class ExrDecoderTests
[Theory]
[WithFile(TestImages.Exr.Uncompressed, PixelTypes.Rgba32)]
public void ExrDecoder_CanDecode_Uncompressed_RGBA<TPixel>(TestImageProvider<TPixel> provider)
public void ExrDecoder_CanDecode_Uncompressed_Rgba_ExrPixelType_Half<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(ExrDecoder.Instance);
image.DebugSave(provider);
image.CompareToOriginal(provider, ReferenceDecoder);
}
[Theory]
[WithFile(TestImages.Exr.UncompressedFloatRgb, PixelTypes.Rgba32)]
public void ExrDecoder_CanDecode_Uncompressed_Rgb_ExrPixelType_Float<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
using Image<TPixel> image = provider.GetImage(ExrDecoder.Instance);

1
tests/ImageSharp.Tests/TestImages.cs

@ -1390,5 +1390,6 @@ public static class TestImages
public const string B44 = "Exr/Calliphora_b44.exr";
public const string Rgb = "Exr/Calliphora_rgb.exr";
public const string Gray = "Exr/Calliphora_gray.exr";
public const string UncompressedFloatRgb = "Exr/rgb_float32_uncompressed.exr";
}
}

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

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