Last post Oct 15, 2009 05:37 AM by DeadBurger
Oct 14, 2009 11:15 AM|ardestan|LINK
i'm trying to save image to the server disk using webservice, the service get the file name and
the type (byte) and he needed to save it to the server disk.
he need to convert it to some image format (jpg,bmp etc.) and then to save it.
Oct 14, 2009 02:03 PM|DeadBurger|LINK
using (MemoryStream ms = new MemoryStream(myByteArray,0,myByteArray.Length))
newImage = Image.FromStream(ms,true);
Oct 15, 2009 04:54 AM|ardestan|LINK
but what about the format, which format is Image, and how he knows to where (path)
in the disk to save the image?
Oct 15, 2009 05:37 AM|DeadBurger|LINK
You have to pass the path someway, the image class figures out the format and you can save it like this:
FileStream fs = File.Create("theFile.jpg");