public void ParseStreamPdfJs() { using (var memoryStream = new MemoryStream(this.jpegBytes)) { var decoder = new JpegDecoderCore(Configuration.Default, new Formats.Jpeg.JpegDecoder { IgnoreMetadata = true }); decoder.ParseStream(memoryStream); decoder.Dispose(); } }
public void ParseStreamPdfJs() { using var memoryStream = new MemoryStream(this.jpegBytes); using var bufferedStream = new BufferedReadStream(Configuration.Default, memoryStream); var decoder = new JpegDecoderCore(Configuration.Default, new JpegDecoder { IgnoreMetadata = true }); decoder.ParseStream(bufferedStream); decoder.Dispose(); }
public void ParseStream() { using var memoryStream = new MemoryStream(this.jpegBytes); using var bufferedStream = new BufferedReadStream(Configuration.Default, memoryStream); var decoder = new JpegDecoderCore(Configuration.Default, new JpegDecoder { IgnoreMetadata = true }); var scanDecoder = new HuffmanScanDecoder(bufferedStream, new NoopSpectralConverter(), cancellationToken: default); decoder.ParseStream(bufferedStream, scanDecoder, cancellationToken: default); decoder.Dispose(); }