mirror of https://github.com/SixLabors/ImageSharp
8 changed files with 81 additions and 3 deletions
@ -0,0 +1,54 @@ |
|||
// Copyright (c) Six Labors.
|
|||
// Licensed under the Six Labors Split License.
|
|||
|
|||
using SixLabors.ImageSharp.Formats.OpenExr; |
|||
using SixLabors.ImageSharp.PixelFormats; |
|||
|
|||
namespace SixLabors.ImageSharp.Tests.Formats.Exr; |
|||
|
|||
[Trait("Format", "Exr")] |
|||
[ValidateDisposedMemoryAllocations] |
|||
public class ExrDecoderTests |
|||
{ |
|||
private static ExrDecoder ExrDecoder => new(); |
|||
|
|||
[Theory] |
|||
[WithFile(TestImages.Exr.Uncompressed, PixelTypes.Rgba32)] |
|||
public void ExrDecoder_CanDecode_Uncompressed<TPixel>(TestImageProvider<TPixel> provider) |
|||
where TPixel : unmanaged, IPixel<TPixel> |
|||
{ |
|||
using Image<TPixel> image = provider.GetImage(ExrDecoder); |
|||
image.DebugSave(provider); |
|||
image.CompareToOriginal(provider); |
|||
} |
|||
|
|||
[Theory] |
|||
[WithFile(TestImages.Exr.Zip, PixelTypes.Rgba32)] |
|||
public void ExrDecoder_CanDecode_ZipCompressed<TPixel>(TestImageProvider<TPixel> provider) |
|||
where TPixel : unmanaged, IPixel<TPixel> |
|||
{ |
|||
using Image<TPixel> image = provider.GetImage(ExrDecoder); |
|||
image.DebugSave(provider); |
|||
image.CompareToOriginal(provider); |
|||
} |
|||
|
|||
[Theory] |
|||
[WithFile(TestImages.Exr.Zips, PixelTypes.Rgba32)] |
|||
public void ExrDecoder_CanDecode_ZipsCompressed<TPixel>(TestImageProvider<TPixel> provider) |
|||
where TPixel : unmanaged, IPixel<TPixel> |
|||
{ |
|||
using Image<TPixel> image = provider.GetImage(ExrDecoder); |
|||
image.DebugSave(provider); |
|||
image.CompareToOriginal(provider); |
|||
} |
|||
|
|||
[Theory] |
|||
[WithFile(TestImages.Exr.Rle, PixelTypes.Rgba32)] |
|||
public void ExrDecoder_CanDecode_RunLengthCompressed<TPixel>(TestImageProvider<TPixel> provider) |
|||
where TPixel : unmanaged, IPixel<TPixel> |
|||
{ |
|||
using Image<TPixel> image = provider.GetImage(ExrDecoder); |
|||
image.DebugSave(provider); |
|||
image.CompareToOriginal(provider); |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:6302e72676f5574b8a9dde7e4385cff1c115e9833b630118328b88aea07e31d0 |
|||
size 4098454 |
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:71613ff5972fa9e7b405ac944d159d1791ad229f5560da616438c9d718eafd24 |
|||
size 5798633 |
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:92c78a7cf9fce29e725511acadf49f0f784914da5bef55b0e0c4e75ba09c3a75 |
|||
size 2652397 |
|||
@ -0,0 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:3e34a9b0bb7fd6eb24eef633dea737653812fd8ab5c5352f6e10523055823b1d |
|||
size 2918571 |
|||
Loading…
Reference in new issue