示例#1
0
        /// <inheritdoc/>
        public void Encode <TPixel>(Image <TPixel> image, Stream stream)
            where TPixel : struct, IPixel <TPixel>
        {
            GifEncoderCore encoder = new GifEncoderCore(this);

            encoder.Encode(image, stream);
        }
示例#2
0
        /// <summary>
        /// Encodes the image to the specified stream from the <see cref="Image{TColor}"/>.
        /// </summary>
        /// <typeparam name="TColor">The pixel format.</typeparam>
        /// <param name="image">The <see cref="Image{TColor}"/> to encode from.</param>
        /// <param name="stream">The <see cref="Stream"/> to encode the image data to.</param>
        /// <param name="options">The options for the encoder.</param>
        public void Encode <TColor>(Image <TColor> image, Stream stream, IGifEncoderOptions options)
            where TColor : struct, IPixel <TColor>
        {
            GifEncoderCore encoder = new GifEncoderCore(options);

            encoder.Encode(image, stream);
        }
示例#3
0
        /// <inheritdoc/>
        public void Encode <TColor>(Image <TColor> image, Stream stream)
            where TColor : struct, IPackedPixel, IEquatable <TColor>
        {
            GifEncoderCore encoder = new GifEncoderCore
            {
                Quality   = this.Quality,
                Quantizer = this.Quantizer,
                Threshold = this.Threshold
            };

            encoder.Encode(image, stream);
        }