using System; using System.Collections.Generic; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.RemoteDesktop.Encoders { /// /// Represents an BMP encoder. /// /// public class BitmapEncoder : FrameEncoder { /// /// Initializes a new instance of the class. /// /// The frame. public BitmapEncoder(IFrame frame) : base(frame) { } /// /// Returns a stream containing the encoded frame. /// /// public override MemoryStream ToStream() { MemoryStream ms = new MemoryStream(); Frame.ToBitmap().Save(ms, ImageFormat.Bmp); return ms; } } }