Skip to content

Commit b860f55

Browse files
Add YCCK test
1 parent b10d88a commit b860f55

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,21 @@ public void Decode_CMYK_ICC_Jpeg<TPixel>(TestImageProvider<TPixel> provider)
380380
image.CompareToReferenceOutput(provider);
381381
}
382382

383+
[Theory]
384+
[WithFile(TestImages.Jpeg.ICC.YCCK, PixelTypes.Rgba32)]
385+
public void Decode_YCCK_ICC_Jpeg<TPixel>(TestImageProvider<TPixel> provider)
386+
where TPixel : unmanaged, IPixel<TPixel>
387+
{
388+
JpegDecoderOptions options = new()
389+
{
390+
GeneralOptions = new() { ColorProfileHandling = ColorProfileHandling.Convert }
391+
};
392+
393+
using Image<TPixel> image = provider.GetImage(JpegDecoder.Instance, options);
394+
image.DebugSave(provider);
395+
image.CompareToReferenceOutput(provider);
396+
}
397+
383398
[Theory]
384399
[WithFile(TestImages.Jpeg.ICC.SRgb, PixelTypes.Rgba32)]
385400
[WithFile(TestImages.Jpeg.ICC.AdobeRgb, PixelTypes.Rgba32)]

tests/ImageSharp.Tests/TestImages.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ public static class ICC
212212
public const string WideRGB = "Jpg/icc-profiles/Momiji-WideRGB-yes.jpg";
213213
public const string AppleRGB = "Jpg/icc-profiles/Momiji-AppleRGB-yes.jpg";
214214
public const string CMYK = "Jpg/icc-profiles/issue-129.jpg";
215+
public const string YCCK = "Jpg/icc-profiles/issue_2723.jpg";
215216
}
216217

217218
public static class Progressive
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)