Last post Oct 14, 2006 12:02 PM by rewt
Oct 14, 2006 11:37 AM|rewt|LINK
I have run into a stumbling block with my latest application. I am using web services and WSE 3.0 to upload large images (tiffs and jpegs) to a central server. The image data successfully gets to the server via the web services as a byte but I am not able
to save large images to disk for some reason. If the image is greater than ~5MB I always receive the following error message. "A generic error occurred in GDI+". The error code is -2147467259. This happens on the image.Save method. Since I can save smaller
images to disk I do not think that this is a permissions problem. My code follows. imageFile.Contents is a byte array that contains the image content as received via the web service and WSE 3.0.
using (System.IO.MemoryStream memStream = new System.IO.MemoryStream(imageFile.Contents))
using (System.Drawing.Image image = System.Drawing.Image.FromStream(memStream, true, false))
image.Save(agsTempPath + agsTempName);
Any ideas what might be happening?
Oct 14, 2006 12:02 PM|rewt|LINK