CSharp examples for System.Drawing:Image Convert
Bitmap To Memory Stream
using System.Drawing; using System.IO;//from w w w . j av a 2 s .c om public class Main{ public static MemoryStream ToMemoryStream(this Bitmap b) { MemoryStream ms = new MemoryStream(); b.Save(ms, System.Drawing.Imaging.ImageFormat.Png); return ms; } }