diff --git a/src/ImageSharp/Formats/Jpeg/JpegConstants.cs b/src/ImageSharp/Formats/Jpeg/JpegConstants.cs
index 98c402599..89c4de550 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegConstants.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegConstants.cs
@@ -183,6 +183,16 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
///
public const byte SOF3 = 0xC3;
+ ///
+ /// Start of Frame marker, differential, Huffman coding, Differential sequential DCT.
+ ///
+ public const byte SOF5 = 0xC5;
+
+ ///
+ /// Start of Frame marker, differential, Huffman coding, Differential progressive DCT.
+ ///
+ public const byte SOF6 = 0xC6;
+
///
/// Start of Frame marker, differential lossless, Huffman coding.
///
diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
index 3810dd19c..96520c535 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
@@ -247,6 +247,14 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
this.ProcessStartOfFrameMarker(stream, remaining, fileMarker, metadataOnly);
break;
+ case JpegConstants.Markers.SOF5:
+ JpegThrowHelper.ThrowNotSupportedException("Decoding jpeg files with differential sequential DCT is not supported.");
+ break;
+
+ case JpegConstants.Markers.SOF6:
+ JpegThrowHelper.ThrowNotSupportedException("Decoding jpeg files with differential progressive DCT is not supported.");
+ break;
+
case JpegConstants.Markers.SOF3:
case JpegConstants.Markers.SOF7:
JpegThrowHelper.ThrowNotSupportedException("Decoding lossless jpeg files is not supported.");