/// <inheritdoc/> public void Encode <TPixel>(Image <TPixel> image, Stream stream) where TPixel : struct, IPixel <TPixel> { var encoder = new BmpEncoderCore(this); encoder.Encode(image, stream); }
/// <inheritdoc/> public void Encode <TColor>(Image <TColor> image, Stream stream) where TColor : struct, IPackedPixel, IEquatable <TColor> { BmpEncoderCore encoder = new BmpEncoderCore(); encoder.Encode(image, stream, this.BitsPerPixel); }
/// <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, IBmpEncoderOptions options) where TColor : struct, IPixel <TColor> { BmpEncoderCore encoder = new BmpEncoderCore(options); encoder.Encode(image, stream); }
/// <inheritdoc/> public void Encode <TColor, TPacked>(Image <TColor, TPacked> image, Stream stream) where TColor : struct, IPackedPixel <TPacked> where TPacked : struct { BmpEncoderCore encoder = new BmpEncoderCore(); encoder.Encode(image, stream, this.BitsPerPixel); }