From 3c788ebf7f1282acf2d81b70803da03a9af648a5 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Wed, 28 Feb 2018 01:40:58 +0100 Subject: [PATCH 1/5] added failing tests for #464 --- tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs | 1 + tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs | 1 + tests/ImageSharp.Tests/TestImages.cs | 1 + tests/Images/External | 2 +- .../Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg | 3 +++ 5 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index 9d04cf354..d78277528 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -43,6 +43,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Baseline.Bad.BadEOF, TestImages.Jpeg.Baseline.Bad.ExifUndefType, TestImages.Jpeg.Issues.MultiHuffmanBaseline394, + TestImages.Jpeg.Issues.CmykIssueBaseline464 }; public static string[] ProgressiveTestJpegs = diff --git a/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs index 4508c6863..32c3be47d 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs @@ -29,6 +29,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Baseline.Jpeg444, TestImages.Jpeg.Baseline.Testorig420, TestImages.Jpeg.Baseline.Jpeg420Small, TestImages.Jpeg.Baseline.Bad.BadEOF, TestImages.Jpeg.Baseline.Bad.ExifUndefType, + TestImages.Jpeg.Issues.CmykIssueBaseline464 }; public static readonly string[] ProgressiveTestJpegs = diff --git a/tests/ImageSharp.Tests/TestImages.cs b/tests/ImageSharp.Tests/TestImages.cs index 864c96332..bb66414fb 100644 --- a/tests/ImageSharp.Tests/TestImages.cs +++ b/tests/ImageSharp.Tests/TestImages.cs @@ -129,6 +129,7 @@ namespace SixLabors.ImageSharp.Tests public const string BadCoeffsProgressive178 = "Jpg/issues/Issue178-BadCoeffsProgressive-Lemon.jpg"; public const string BadZigZagProgressive385 = "Jpg/issues/Issue385-BadZigZag-Progressive.jpg"; public const string MultiHuffmanBaseline394 = "Jpg/issues/Issue394-MultiHuffmanBaseline-Speakers.jpg"; + public const string CmykIssueBaseline464 = "Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg"; } public static readonly string[] All = Baseline.All.Concat(Progressive.All).ToArray(); diff --git a/tests/Images/External b/tests/Images/External index 20f83891c..cdc178daa 160000 --- a/tests/Images/External +++ b/tests/Images/External @@ -1 +1 @@ -Subproject commit 20f83891ce75597486f5532010a8c5dea1419a4d +Subproject commit cdc178daa552856157d1834ad136f9a28996a0f9 diff --git a/tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg b/tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg new file mode 100644 index 000000000..a158e0ba2 --- /dev/null +++ b/tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96f29bee2175f34b9637d684f8336bc3e5d2bb2711cef352bc9def6ed4424d04 +size 47443 From dd26af1a5005d4beb46d73e283fddb4498091d5b Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 28 Feb 2018 18:12:29 +1100 Subject: [PATCH 2/5] Fix #464 --- .../Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs index 33d625725..aa89abf2e 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs @@ -351,12 +351,10 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort return; } - // when this is a progressive image this gets called a number of times - // need to know how many times this should be called in total. this.ProcessStartOfScanMarker(remaining); - if (this.InputProcessor.ReachedEOF || !this.IsProgressive) + if (this.InputProcessor.ReachedEOF) { - // if unexpeced EOF reached or this is not a progressive image we can stop processing bytes as we now have the image data. + // If unexpected EOF reached. We can stop processing bytes as we now have the image data. processBytes = false; } From 4fc02be38f4f9756ded61685ce05fd5fd86cb8ba Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 28 Feb 2018 21:08:13 +1100 Subject: [PATCH 3/5] Better EOF handling. --- .../Components/Decoder/DecoderThrowHelper.cs | 8 ++++++- .../Jpeg/GolangPort/OrigJpegDecoderCore.cs | 24 ++++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs index d5a9340d7..c1fde41ed 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs @@ -24,8 +24,14 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder throw new ArgumentException("ThrowExceptionForErrorCode() called with NoError!", nameof(errorCode)); case OrigDecoderErrorCode.MissingFF00: throw new MissingFF00Exception(); + case OrigDecoderErrorCode.UnexpectedEndOfStream: - throw new EOFException(); + + // TODO: + // Disabled for now since we want to avoid throwing for most bad eof. + // Will probably delete + // throw new EOFException(); + break; default: throw new ArgumentOutOfRangeException(nameof(errorCode), errorCode, null); } diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs index aa89abf2e..6d3c8f5d1 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs @@ -235,6 +235,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort // Check for the Start Of Image marker. this.InputProcessor.ReadFull(this.Temp, 0, 2); + if (this.Temp[0] != OrigJpegConstants.Markers.XFF || this.Temp[1] != OrigJpegConstants.Markers.SOI) { throw new ImageFormatException("Missing SOI marker."); @@ -247,6 +248,13 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort while (processBytes) { this.InputProcessor.ReadFull(this.Temp, 0, 2); + + if (this.InputProcessor.ReachedEOF) + { + // We've reached the end of the stream. + processBytes = false; + } + while (this.Temp[0] != 0xff) { // Strictly speaking, this is a format error. However, libjpeg is @@ -282,6 +290,13 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort // Section B.1.1.2 says, "Any marker may optionally be preceded by any // number of fill bytes, which are bytes assigned code X'FF'". marker = this.InputProcessor.ReadByte(); + + if (this.InputProcessor.ReachedEOF) + { + // We've reached the end of the stream. + processBytes = false; + break; + } } // End Of Image. @@ -388,15 +403,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort { this.InputProcessor.Skip(remaining); } - else if (marker < OrigJpegConstants.Markers.SOF0) - { - // See Table B.1 "Marker code assignments". - throw new ImageFormatException("Unknown marker"); - } - else - { - throw new ImageFormatException("Unknown marker"); - } break; } From 4579e5958d0b8115dbe496459b20bbc891f45a82 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Wed, 28 Feb 2018 14:17:31 +0100 Subject: [PATCH 4/5] better EOF handling logic --- .../Components/Decoder/DecoderThrowHelper.cs | 11 ++++------- .../GolangPort/Components/Decoder/InputProcessor.cs | 7 +++++++ .../Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs index c1fde41ed..904ce00dd 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecoderThrowHelper.cs @@ -18,20 +18,17 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder [MethodImpl(MethodImplOptions.NoInlining)] public static void ThrowExceptionForErrorCode(this OrigDecoderErrorCode errorCode) { + // REMARK: If this method throws for an image that is expected to be decodable, + // consider using the ***Unsafe variant of the parsing method that asks for ThrowExceptionForErrorCode() + // then verify the error code + implement fallback logic manually! switch (errorCode) { case OrigDecoderErrorCode.NoError: throw new ArgumentException("ThrowExceptionForErrorCode() called with NoError!", nameof(errorCode)); case OrigDecoderErrorCode.MissingFF00: throw new MissingFF00Exception(); - case OrigDecoderErrorCode.UnexpectedEndOfStream: - - // TODO: - // Disabled for now since we want to avoid throwing for most bad eof. - // Will probably delete - // throw new EOFException(); - break; + throw new EOFException(); default: throw new ArgumentOutOfRangeException(nameof(errorCode), errorCode, null); } diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs index d88481ba4..88599808f 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs @@ -107,6 +107,13 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder return this.Bytes.ReadByte(this.InputStream); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public OrigDecoderErrorCode ReadByteUnsafe(out byte result) + { + this.LastErrorCode = this.Bytes.ReadByteUnsafe(this.InputStream, out result); + return this.LastErrorCode; + } + /// /// Decodes a single bit /// TODO: This method (and also the usages) could be optimized by batching! diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs index 6d3c8f5d1..58513fd29 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs @@ -289,7 +289,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort { // Section B.1.1.2 says, "Any marker may optionally be preceded by any // number of fill bytes, which are bytes assigned code X'FF'". - marker = this.InputProcessor.ReadByte(); + this.InputProcessor.ReadByteUnsafe(out marker); if (this.InputProcessor.ReachedEOF) { @@ -318,7 +318,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort // Read the 16-bit length of the segment. The value includes the 2 bytes for the // length itself, so we subtract 2 to get the number of remaining bytes. - this.InputProcessor.ReadFull(this.Temp, 0, 2); + this.InputProcessor.ReadFullUnsafe(this.Temp, 0, 2); int remaining = (this.Temp[0] << 8) + this.Temp[1] - 2; if (remaining < 0) { From 78368a785c57710f61740a099f9b3d0b4af0863a Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Wed, 28 Feb 2018 14:31:18 +0100 Subject: [PATCH 5/5] removing the "Issue" label from #464-s test image + ExifUndefType.jpg is actually progressive! --- tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs | 8 ++++---- .../Formats/Jpg/JpegImagePostProcessorTests.cs | 4 ++-- tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs | 6 +++--- .../MetaData/Profiles/Exif/ExifProfileTests.cs | 2 +- tests/ImageSharp.Tests/TestImages.cs | 4 ++-- tests/Images/External | 2 +- .../MultiScanBaselineCMYK.jpg} | 0 .../Input/Jpg/{baseline => progressive}/ExifUndefType.jpg | 0 8 files changed, 13 insertions(+), 13 deletions(-) rename tests/Images/Input/Jpg/{issues/Issue464-CMYK-DecodedAsGrayscale.jpg => baseline/MultiScanBaselineCMYK.jpg} (100%) rename tests/Images/Input/Jpg/{baseline => progressive}/ExifUndefType.jpg (100%) diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index d78277528..139fa351b 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -41,9 +41,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Baseline.Jpeg444, TestImages.Jpeg.Baseline.Bad.BadEOF, - TestImages.Jpeg.Baseline.Bad.ExifUndefType, TestImages.Jpeg.Issues.MultiHuffmanBaseline394, - TestImages.Jpeg.Issues.CmykIssueBaseline464 + TestImages.Jpeg.Baseline.MultiScanBaselineCMYK }; public static string[] ProgressiveTestJpegs = @@ -52,14 +51,14 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Progressive.Festzug, TestImages.Jpeg.Progressive.Bad.BadEOF, TestImages.Jpeg.Issues.BadCoeffsProgressive178, TestImages.Jpeg.Issues.MissingFF00ProgressiveGirl159, - TestImages.Jpeg.Issues.BadZigZagProgressive385 + TestImages.Jpeg.Issues.BadZigZagProgressive385, + TestImages.Jpeg.Progressive.Bad.ExifUndefType }; private static readonly Dictionary CustomToleranceValues = new Dictionary { // Baseline: [TestImages.Jpeg.Baseline.Calliphora] = 0.00002f / 100, - [TestImages.Jpeg.Baseline.Bad.ExifUndefType] = 0.011f / 100, [TestImages.Jpeg.Baseline.Bad.BadEOF] = 0.38f / 100, [TestImages.Jpeg.Baseline.Testorig420] = 0.38f / 100, @@ -71,6 +70,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg [TestImages.Jpeg.Progressive.Fb] = 0.16f / 100, [TestImages.Jpeg.Progressive.Progress] = 0.31f / 100, [TestImages.Jpeg.Issues.BadZigZagProgressive385] = 0.23f / 100, + [TestImages.Jpeg.Progressive.Bad.ExifUndefType] = 0.011f / 100, }; public const PixelTypes CommonNonDefaultPixelTypes = PixelTypes.Rgba32 | PixelTypes.Argb32 | PixelTypes.RgbaVector; diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegImagePostProcessorTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegImagePostProcessorTests.cs index 423673ef9..ec4a42104 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegImagePostProcessorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegImagePostProcessorTests.cs @@ -21,13 +21,13 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Baseline.Jpeg420Small, TestImages.Jpeg.Baseline.Jpeg444, TestImages.Jpeg.Baseline.Bad.BadEOF, - TestImages.Jpeg.Baseline.Bad.ExifUndefType, }; public static string[] ProgressiveTestJpegs = { TestImages.Jpeg.Progressive.Fb, TestImages.Jpeg.Progressive.Progress, - TestImages.Jpeg.Progressive.Festzug, TestImages.Jpeg.Progressive.Bad.BadEOF + TestImages.Jpeg.Progressive.Festzug, TestImages.Jpeg.Progressive.Bad.BadEOF, + TestImages.Jpeg.Progressive.Bad.ExifUndefType, }; public JpegImagePostProcessorTests(ITestOutputHelper output) diff --git a/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs index 32c3be47d..6816b8465 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs @@ -28,14 +28,14 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg TestImages.Jpeg.Baseline.Calliphora, TestImages.Jpeg.Baseline.Cmyk, TestImages.Jpeg.Baseline.Jpeg400, TestImages.Jpeg.Baseline.Jpeg444, TestImages.Jpeg.Baseline.Testorig420, TestImages.Jpeg.Baseline.Jpeg420Small, TestImages.Jpeg.Baseline.Bad.BadEOF, - TestImages.Jpeg.Baseline.Bad.ExifUndefType, - TestImages.Jpeg.Issues.CmykIssueBaseline464 + TestImages.Jpeg.Baseline.MultiScanBaselineCMYK }; public static readonly string[] ProgressiveTestJpegs = { TestImages.Jpeg.Progressive.Fb, TestImages.Jpeg.Progressive.Progress, - TestImages.Jpeg.Progressive.Festzug, TestImages.Jpeg.Progressive.Bad.BadEOF + TestImages.Jpeg.Progressive.Festzug, TestImages.Jpeg.Progressive.Bad.BadEOF, + TestImages.Jpeg.Progressive.Bad.ExifUndefType, }; public static readonly string[] AllTestJpegs = BaselineTestJpegs.Concat(ProgressiveTestJpegs).ToArray(); diff --git a/tests/ImageSharp.Tests/MetaData/Profiles/Exif/ExifProfileTests.cs b/tests/ImageSharp.Tests/MetaData/Profiles/Exif/ExifProfileTests.cs index edeeebd28..5e7e9e3a7 100644 --- a/tests/ImageSharp.Tests/MetaData/Profiles/Exif/ExifProfileTests.cs +++ b/tests/ImageSharp.Tests/MetaData/Profiles/Exif/ExifProfileTests.cs @@ -272,7 +272,7 @@ namespace SixLabors.ImageSharp.Tests [Fact] public void ExifTypeUndefined() { - Image image = TestFile.Create(TestImages.Jpeg.Baseline.Bad.ExifUndefType).CreateImage(); + Image image = TestFile.Create(TestImages.Jpeg.Progressive.Bad.ExifUndefType).CreateImage(); Assert.NotNull(image); ExifProfile profile = image.MetaData.ExifProfile; diff --git a/tests/ImageSharp.Tests/TestImages.cs b/tests/ImageSharp.Tests/TestImages.cs index bb66414fb..f1f989581 100644 --- a/tests/ImageSharp.Tests/TestImages.cs +++ b/tests/ImageSharp.Tests/TestImages.cs @@ -85,6 +85,7 @@ namespace SixLabors.ImageSharp.Tests public static class Bad { public const string BadEOF = "Jpg/progressive/BadEofProgressive.jpg"; + public const string ExifUndefType = "Jpg/progressive/ExifUndefType.jpg"; } public static readonly string[] All = { Fb, Progress, Festzug }; @@ -95,7 +96,6 @@ namespace SixLabors.ImageSharp.Tests public static class Bad { public const string BadEOF = "Jpg/baseline/badeof.jpg"; - public const string ExifUndefType = "Jpg/baseline/ExifUndefType.jpg"; } public const string Cmyk = "Jpg/baseline/cmyk.jpg"; @@ -113,6 +113,7 @@ namespace SixLabors.ImageSharp.Tests public const string Jpeg444 = "Jpg/baseline/jpeg444.jpg"; public const string Jpeg420Small = "Jpg/baseline/jpeg420small.jpg"; public const string Testorig420 = "Jpg/baseline/testorig.jpg"; + public const string MultiScanBaselineCMYK = "Jpg/baseline/MultiScanBaselineCMYK.jpg"; public static readonly string[] All = { @@ -129,7 +130,6 @@ namespace SixLabors.ImageSharp.Tests public const string BadCoeffsProgressive178 = "Jpg/issues/Issue178-BadCoeffsProgressive-Lemon.jpg"; public const string BadZigZagProgressive385 = "Jpg/issues/Issue385-BadZigZag-Progressive.jpg"; public const string MultiHuffmanBaseline394 = "Jpg/issues/Issue394-MultiHuffmanBaseline-Speakers.jpg"; - public const string CmykIssueBaseline464 = "Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg"; } public static readonly string[] All = Baseline.All.Concat(Progressive.All).ToArray(); diff --git a/tests/Images/External b/tests/Images/External index cdc178daa..8714b94dc 160000 --- a/tests/Images/External +++ b/tests/Images/External @@ -1 +1 @@ -Subproject commit cdc178daa552856157d1834ad136f9a28996a0f9 +Subproject commit 8714b94dc4bab6788fcbb6254174db2b9c8f69c9 diff --git a/tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg b/tests/Images/Input/Jpg/baseline/MultiScanBaselineCMYK.jpg similarity index 100% rename from tests/Images/Input/Jpg/issues/Issue464-CMYK-DecodedAsGrayscale.jpg rename to tests/Images/Input/Jpg/baseline/MultiScanBaselineCMYK.jpg diff --git a/tests/Images/Input/Jpg/baseline/ExifUndefType.jpg b/tests/Images/Input/Jpg/progressive/ExifUndefType.jpg similarity index 100% rename from tests/Images/Input/Jpg/baseline/ExifUndefType.jpg rename to tests/Images/Input/Jpg/progressive/ExifUndefType.jpg