// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Formats { using System; using System.IO; /// /// Image encoder for writing image data to a stream in gif format. /// public class GifEncoder : IImageEncoder { /// public void Encode(Image image, Stream stream, IEncoderOptions options) where TColor : struct, IPixel { IGifEncoderOptions gifOptions = GifEncoderOptions.Create(options); this.Encode(image, stream, gifOptions); } /// /// Encodes the image to the specified stream from the . /// /// The pixel format. /// The to encode from. /// The to encode the image data to. /// The options for the encoder. public void Encode(Image image, Stream stream, IGifEncoderOptions options) where TColor : struct, IPixel { GifEncoderCore encoder = new GifEncoderCore(options); encoder.Encode(image, stream); } } }