|
1 | 1 | // Copyright (c) Six Labors. |
2 | 2 | // Licensed under the Six Labors Split License. |
3 | 3 |
|
4 | | -using System.Runtime.InteropServices; |
5 | 4 | using System.Runtime.Intrinsics.X86; |
6 | 5 | using Microsoft.DotNet.RemoteExecutor; |
7 | 6 | using SixLabors.ImageSharp.Formats; |
@@ -724,10 +723,8 @@ public void TgaDecoder_CanDecode_WhenAlphaBitsNotSet<TPixel>(TestImageProvider<T |
724 | 723 | { |
725 | 724 | using (Image<TPixel> image = provider.GetImage(TgaDecoder.Instance)) |
726 | 725 | { |
727 | | - // Using here the reference output instead of the the reference decoder, |
728 | | - // because the reference decoder does not ignore the alpha data here. |
729 | 726 | image.DebugSave(provider); |
730 | | - image.CompareToReferenceOutput(ImageComparer.Exact, provider); |
| 727 | + ImageComparingUtils.CompareWithReferenceDecoder(provider, image); |
731 | 728 | } |
732 | 729 | } |
733 | 730 |
|
@@ -771,6 +768,19 @@ public void TgaDecoder_Decode_Resize<TPixel>(TestImageProvider<TPixel> provider) |
771 | 768 | appendPixelTypeToFileName: false); |
772 | 769 | } |
773 | 770 |
|
| 771 | + // https://github.com/SixLabors/ImageSharp/issues/2629 |
| 772 | + [Theory] |
| 773 | + [WithFile(Issue2629, PixelTypes.Rgba32)] |
| 774 | + public void TgaDecoder_CanDecode_Issue2629<TPixel>(TestImageProvider<TPixel> provider) |
| 775 | + where TPixel : unmanaged, IPixel<TPixel> |
| 776 | + { |
| 777 | + using (Image<TPixel> image = provider.GetImage(TgaDecoder.Instance)) |
| 778 | + { |
| 779 | + image.DebugSave(provider); |
| 780 | + ImageComparingUtils.CompareWithReferenceDecoder(provider, image); |
| 781 | + } |
| 782 | + } |
| 783 | + |
774 | 784 | [Theory] |
775 | 785 | [WithFile(Bit16BottomLeft, PixelTypes.Rgba32)] |
776 | 786 | [WithFile(Bit24BottomLeft, PixelTypes.Rgba32)] |
|
0 commit comments