diff --git a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs index 060572fc3..7e25e945a 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs @@ -73,8 +73,7 @@ internal readonly struct JFifMarker : IEquatable { // Some images incorrectly use JFXX as the App0 marker (Issue 2478) if (ProfileResolver.IsProfile(bytes, ProfileResolver.JFifMarker) - || ProfileResolver.IsProfile(bytes, ProfileResolver.JFxxMarker) - || ProfileResolver.IsProfile(bytes, ProfileResolver.OSQidMaker)) + || ProfileResolver.IsProfile(bytes, ProfileResolver.JFxxMarker)) { byte majorVersion = bytes[5]; byte minorVersion = bytes[6]; diff --git a/src/ImageSharp/Formats/Jpeg/Components/Decoder/ProfileResolver.cs b/src/ImageSharp/Formats/Jpeg/Components/Decoder/ProfileResolver.cs index ed916c205..c11679feb 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Decoder/ProfileResolver.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Decoder/ProfileResolver.cs @@ -24,14 +24,6 @@ internal static class ProfileResolver (byte)'J', (byte)'F', (byte)'X', (byte)'X', (byte)'\0' }; - /// - /// Gets the \n[ID or 10 91 73 68 32 specific markers. - /// - public static ReadOnlySpan OSQidMaker => new[] - { - (byte)'\n', (byte)'[', (byte)'I', (byte)'D', (byte)' ' - }; - /// /// Gets the ICC specific markers. /// diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs index 83a828caa..ccace190f 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs @@ -753,10 +753,7 @@ internal sealed class JpegDecoderCore : IRawJpegData, IImageDecoderInternals Span temp = stackalloc byte[2 * 16 * 4]; stream.Read(temp, 0, JFifMarker.Length); - if (!JFifMarker.TryParse(temp, out this.jFif)) - { - JpegThrowHelper.ThrowNotSupportedException("Unknown App0 Marker - Expected JFIF."); - } + _ = JFifMarker.TryParse(temp, out this.jFif); remaining -= JFifMarker.Length; diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index f87289522..deea9217f 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -330,7 +330,7 @@ public partial class JpegDecoderTests [Theory] [WithFile(TestImages.Jpeg.Issues.Issue2564, PixelTypes.Rgba32)] public void Issue2564_DecodeWorks(TestImageProvider provider) - where TPixel : unmanaged, IPixel + where TPixel : unmanaged, IPixel { using Image image = provider.GetImage(JpegDecoder.Instance); image.DebugSave(provider);