From 3c4d0fefd3cd1a41ec5a725e93177ccb42c908a4 Mon Sep 17 00:00:00 2001 From: Dmitry Pentin Date: Sun, 11 Jul 2021 17:05:04 +0300 Subject: [PATCH] Fixed invalid frame mcu size calculation --- src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs index 6dd88a00cd..37628e88d7 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs @@ -924,10 +924,10 @@ namespace SixLabors.ImageSharp.Formats.Jpeg this.Frame.MaxHorizontalFactor = maxH; this.Frame.MaxVerticalFactor = maxV; - this.ImageSizeInMCU = new Size(this.Frame.McusPerLine, this.Frame.McusPerColumn); - this.Frame.InitComponents(); + this.ImageSizeInMCU = new Size(this.Frame.McusPerLine, this.Frame.McusPerColumn); + // This can be injected in SOF marker callback this.scanDecoder.InjectFrameData(this.Frame, this); }