diff --git a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegFrame.cs b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegFrame.cs
index 7fc3f0d97a..483c22a39d 100644
--- a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegFrame.cs
+++ b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegFrame.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Six Labors and contributors.
+// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
using System;
@@ -28,12 +28,12 @@ internal sealed class JpegFrame : IDisposable
///
/// Gets or sets the number of scanlines within the frame.
///
- public short Scanlines { get; set; }
+ public int Scanlines { get; set; }
///
/// Gets or sets the number of samples per scanline.
///
- public short SamplesPerLine { get; set; }
+ public int SamplesPerLine { get; set; }
///
/// Gets or sets the number of components within a frame. In progressive frames this value can range from only 1 to 4.
@@ -105,4 +105,4 @@ public void InitComponents()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
index a754bfd2e7..e61ca326aa 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
@@ -841,8 +841,8 @@ private void ProcessStartOfFrameMarker(int remaining, in JpegFileMarker frameMar
Extended = frameMarker.Marker == JpegConstants.Markers.SOF1,
Progressive = frameMarker.Marker == JpegConstants.Markers.SOF2,
Precision = this.temp[0],
- Scanlines = (short)((this.temp[1] << 8) | this.temp[2]),
- SamplesPerLine = (short)((this.temp[3] << 8) | this.temp[4]),
+ Scanlines = (this.temp[1] << 8) | this.temp[2],
+ SamplesPerLine = (this.temp[3] << 8) | this.temp[4],
ComponentCount = this.temp[5]
};