Exemplo n.º 1
0
        /// <inheritdoc />
        public Task <IImageInfo> IdentifyAsync(Configuration configuration, Stream stream, CancellationToken cancellationToken)
        {
            if (configuration is null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (stream is null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            var decoder = new TiffDecoderCore(configuration, this);

            return(decoder.IdentifyAsync(stream, cancellationToken));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public Task <Image <TPixel> > DecodeAsync <TPixel>(Configuration configuration, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel <TPixel>
        {
            if (configuration is null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (stream is null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            var decoder = new TiffDecoderCore(configuration, this);

            return(decoder.DecodeAsync <TPixel>(stream, cancellationToken));
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        public IImageInfo Identify(Configuration configuration, Stream stream)
        {
            if (configuration is null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (stream is null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            var decoder = new TiffDecoderCore(configuration, this);

            return(decoder.Identify(stream));
        }
Exemplo n.º 4
0
        /// <inheritdoc />
        public Image <TPixel> Decode <TPixel>(Configuration configuration, Stream stream) where TPixel : unmanaged, IPixel <TPixel>
        {
            if (configuration is null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (stream is null)
            {
                throw new ArgumentNullException(nameof(stream));
            }

            var decoder = new TiffDecoderCore(configuration, this);

            return(decoder.Decode <TPixel>(stream));
        }