Exemplo n.º 1
0
        /// <inheritdoc/>
        public void Encode <TPixel>(Image <TPixel> image, Stream stream)
            where TPixel : unmanaged, IPixel <TPixel>
        {
            var encoder = new TgaEncoderCore(this, image.GetMemoryAllocator());

            encoder.Encode(image, stream);
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public Task EncodeAsync <TPixel>(Image <TPixel> image, Stream stream, CancellationToken cancellationToken)
            where TPixel : unmanaged, IPixel <TPixel>
        {
            var encoder = new TgaEncoderCore(this, image.GetMemoryAllocator());

            return(encoder.EncodeAsync(image, stream, cancellationToken));
        }