See this . In the tutorial, you can use an array of bytes to get images.
UPDATE: By the way, you should use this function:
string imageDataParsed = imageData.Substring( imageData.IndexOf( ',' ) + 1 );
byte[] imageBytes = Convert.FromBase64String( imageDataParsed );
using ( var imageStream = new MemoryStream( imageBytes, false ) )
{
Bitmap image = new Bitmap( imageStream );
}
Edit
You can convert base64string to an image using Image.FromStream. First you need to convert base64string to a stream.
byte[] imageBytes = Convert.FromBase64String(imgBase64String);
MemoryStream ms1 = new MemoryStream(imageBytes);
Image img = Image.FromStream(ms1);
source
share