Kiran Karale

Kiran Karale

  • NA
  • 390
  • 213.9k

CONVERTING A BASE64 STRING TO AN IMAGE IN ASP.NET

Aug 28 2012 3:07 AM
Hi,
anybody to tell me how to convet base64 string to an image in asp.net



string base64 = @"R0lGODlhSwDRAPYAAG9qb6mlqJwdJMzHy5qYm722vbS2zldTWKzK9smjabKPZfLVnL26vo
		V7gsS2vkc5QoeEiG1LS5Rydv/+/zYyOMS8wkoyNEhDSLSus5GVrbSytbJycQwIEGNdZCciKbSJjOrl6nUwNXqIrY";
		Bitmap map;
		MemoryStream stream = new MemoryStream(Convert.FromBase64String(base64));
		
		map = (Bitmap)Image.FromStream(stream);
i wrote this  code bt showing invalid lenght  a for base64 char array 
then how to solve this problem
if anybody to know then help me..