FileStream
fs = null;fs =
new FileStream(filepath, FileMode.Open); StreamReader sr = new StreamReader(fs); string s = sr.ReadToEnd();System.Text.
StringBuilder sbText = new System.Text.StringBuilder(s, s.Length);sbText.Replace(
"\r\n", String.Empty);sbText.Replace(
" ", String.Empty); Byte[] imageBytes = new Byte[sbText.Length];imageBytes = System.Text.
Encoding.Default.GetBytes(sbText.ToString()); string strBase64 = Convert.ToBase64String(imageBytes); byte[] byteresponse = Convert.FromBase64String(strBase64);System.IO.
MemoryStream streamBitmap = new System.IO.MemoryStream(byteresponse);Bitmap bitImage = new Bitmap((Bitmap)System.Drawing.Image.FromStream(streamBitmap));
Error in last line
Parameter is not valid
plz help me
Replies
Know the answer? Post it — somebody with the same question will find it here.