|
|
|
@ -361,15 +361,18 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort |
|
|
|
|
|
|
|
break; |
|
|
|
case OrigJpegConstants.Markers.SOS: |
|
|
|
if (!metadataOnly) |
|
|
|
if (metadataOnly) |
|
|
|
{ |
|
|
|
this.ProcessStartOfScanMarker(remaining); |
|
|
|
this.InputProcessor.Skip(remaining); |
|
|
|
} |
|
|
|
|
|
|
|
if (this.InputProcessor.ReachedEOF) |
|
|
|
else |
|
|
|
{ |
|
|
|
// If unexpected EOF reached. We can stop processing bytes as we now have the image data.
|
|
|
|
processBytes = false; |
|
|
|
this.ProcessStartOfScanMarker(remaining); |
|
|
|
if (this.InputProcessor.ReachedEOF) |
|
|
|
{ |
|
|
|
// If unexpected EOF reached. We can stop processing bytes as we now have the image data.
|
|
|
|
processBytes = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|