Browse Source

Fixed invalid internal deconding mode selection for grayscale jpegs

pull/1694/head
Dmitry Pentin 5 years ago
parent
commit
7fbc33c1d1
  1. 2
      src/ImageSharp/Formats/Jpeg/Components/Decoder/HuffmanScanDecoder.cs

2
src/ImageSharp/Formats/Jpeg/Components/Decoder/HuffmanScanDecoder.cs

@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder
private void ParseBaselineData() private void ParseBaselineData()
{ {
if (this.ComponentsLength == 1) if (this.ComponentsLength != this.frame.ComponentCount)
{ {
this.frame.AllocateComponents(fullScan: true); this.frame.AllocateComponents(fullScan: true);
this.ParseBaselineDataNonInterleaved(); this.ParseBaselineDataNonInterleaved();

Loading…
Cancel
Save