|
|
@ -187,8 +187,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
{ |
|
|
{ |
|
|
using var spectralConverter = new SpectralConverter<TPixel>(this.Configuration); |
|
|
using var spectralConverter = new SpectralConverter<TPixel>(this.Configuration); |
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
var scanDecoder = new HuffmanScanDecoder(stream, spectralConverter, cancellationToken); |
|
|
var scanDecoder = new HuffmanScanDecoder(stream, spectralConverter, cancellationToken); |
|
|
|
|
|
|
|
|
this.ParseStream(stream, scanDecoder, cancellationToken); |
|
|
this.ParseStream(stream, scanDecoder, cancellationToken); |
|
|
@ -203,12 +202,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg |
|
|
spectralConverter.GetPixelBuffer(cancellationToken), |
|
|
spectralConverter.GetPixelBuffer(cancellationToken), |
|
|
this.Metadata); |
|
|
this.Metadata); |
|
|
} |
|
|
} |
|
|
catch |
|
|
|
|
|
{ |
|
|
|
|
|
this.Frame?.Dispose(); |
|
|
|
|
|
throw; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
/// <inheritdoc/>
|
|
|
public IImageInfo Identify(BufferedReadStream stream, CancellationToken cancellationToken) |
|
|
public IImageInfo Identify(BufferedReadStream stream, CancellationToken cancellationToken) |
|
|
|