From 5d206ec10f9611603e0e8566ac11725bcb5d6c1f Mon Sep 17 00:00:00 2001 From: Erik White <26148654+Erik-White@users.noreply.github.com> Date: Tue, 26 May 2026 17:41:21 +0200 Subject: [PATCH] Add test data for RGB24 --- tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs | 3 ++- ...4_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png | 3 +++ ...2_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png | 3 --- tests/Images/Input/Png/cgbi/flecks.png | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgb24_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png delete mode 100644 tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgba32_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png diff --git a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs index c1ba56f3b4..d3a699c492 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs @@ -718,8 +718,8 @@ public partial class PngDecoderTests [WithFile(TestImages.Png.Cgbi.Issue410, PixelTypes.Rgba32)] [WithFile(TestImages.Png.Cgbi.Colors, PixelTypes.Rgba32)] [WithFile(TestImages.Png.Cgbi.Clocks, PixelTypes.Rgba32)] - [WithFile(TestImages.Png.Cgbi.Flecks, PixelTypes.Rgba32)] [WithFile(TestImages.Png.Cgbi.Screen, PixelTypes.Rgba32)] + [WithFile(TestImages.Png.Cgbi.Flecks, PixelTypes.Rgb24)] public void Decode_AppleCgBI(TestImageProvider provider) where TPixel : unmanaged, IPixel { @@ -731,6 +731,7 @@ public partial class PngDecoderTests [Theory] [InlineData(TestImages.Png.Cgbi.Colors, 120, 120)] [InlineData(TestImages.Png.Cgbi.Issue410, 42, 26)] + [InlineData(TestImages.Png.Cgbi.Flecks, 510, 512)] public void Identify_AppleCgBI(string imagePath, int expectedWidth, int expectedHeight) { TestFile testFile = TestFile.Create(imagePath); diff --git a/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgb24_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png b/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgb24_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png new file mode 100644 index 0000000000..a180f01186 --- /dev/null +++ b/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgb24_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10ee142fc1d3638ebe53fdd21c0a4c53008801befcc5e986051b796561cae887 +size 237676 diff --git a/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgba32_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png b/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgba32_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png deleted file mode 100644 index 06873607a1..0000000000 --- a/tests/Images/External/ReferenceOutput/PngDecoderTests/Decode_AppleCgBI_Rgba32_flecks_ImageThreshold-0_PerPixelManhattanThreshold-0.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:91bbb6c87f128920d4384f3be2e85ecd176e49a7a5166c6c6aa584e60d8131ed -size 204053 diff --git a/tests/Images/Input/Png/cgbi/flecks.png b/tests/Images/Input/Png/cgbi/flecks.png index 625c82e458..6400442296 100644 --- a/tests/Images/Input/Png/cgbi/flecks.png +++ b/tests/Images/Input/Png/cgbi/flecks.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:314a5a52996953c0c12862262b4ff3fc191d8b6f2b7bb3853cdcea3267a4142d -size 212163 +oid sha256:6be7b478594ba5e4d37bc135c881c0a16cf1c804fece5440bab997c7b69182f1 +size 187703