System.IO.MemoryStream m = new System.IO.MemoryStream(); System.Drawing.Bitmap bp = new System.Drawing.Bitmap(Path); bp.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] b = m.GetBuffer(); string base64string = Convert.ToBase64String(b);
System.IO.MemoryStream m = new System.IO.MemoryStream(); System.Drawing.Bitmap bp = new System.Drawing.Bitmap(Path); bp.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] b = m.GetBuffer(); string base64string = Convert.ToBase64String(b);