public static byte[] ImageToByte(Image img) { ImageConverter converter = new ImageConverter(); return (byte[])converter.ConvertTo(img, typeof(byte[])); }
string scontent = "/9j/4AAQSkZJRgABAQEAyADIAA.......igAooooA//Z"; Byte[] imagebytes = Convert.FromBase64String(scontent); System.IO.MemoryStream ms = new System.IO.MemoryStream(imagebytes); System.Drawing.Image img = System.Drawing.Image.FromStream(ms); img.Save(@"myimg.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)