V
Vinki
Hello Everyone,
I have this code below, I keep getting invalid parameter on the line below:
System.Drawing.Image b =
System.Drawing.Image.FromStream(ms);
[WebMethod]
public bool PutImage(byte[] ImgIn, string clipBoardGUID)
{
try
{
System.IO.MemoryStream ms =
new System.IO.MemoryStream(ImgIn);
System.Drawing.Image b =
System.Drawing.Image.FromStream(ms); -----------> right here
string clipBoardDataDirectory = Server.MapPath(".") +
"\\attachments\\" + clipBoardGUID + ".jpg";
b.Save(clipBoardDataDirectory,
System.Drawing.Imaging.ImageFormat.Jpeg);
}
catch (Exception ex)
{
string c = ex.Message;
return false;
}
return true;
}
I am trying to save an image that has been pasted on richtextbox in vb.net
side. I converted the image to array of bytes.
I have been struggling with this, any help will be greatly appreciated.
I have this code below, I keep getting invalid parameter on the line below:
System.Drawing.Image b =
System.Drawing.Image.FromStream(ms);
[WebMethod]
public bool PutImage(byte[] ImgIn, string clipBoardGUID)
{
try
{
System.IO.MemoryStream ms =
new System.IO.MemoryStream(ImgIn);
System.Drawing.Image b =
System.Drawing.Image.FromStream(ms); -----------> right here
string clipBoardDataDirectory = Server.MapPath(".") +
"\\attachments\\" + clipBoardGUID + ".jpg";
b.Save(clipBoardDataDirectory,
System.Drawing.Imaging.ImageFormat.Jpeg);
}
catch (Exception ex)
{
string c = ex.Message;
return false;
}
return true;
}
I am trying to save an image that has been pasted on richtextbox in vb.net
side. I converted the image to array of bytes.
I have been struggling with this, any help will be greatly appreciated.