Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
        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();
        }