Thanks, I never knew that.
Now I got another problem. I can save an image to the database just fine. When I later load the record, I can also load and display the image. But, if I then save the record again (without changing the image), then it says "A generic error occured in GDI+" on the Save line:
It works the first time (when the user picks an image), but when I load the image and then try to save it again, without having changed it, then this error occurs.Code:pic.Save(stream, ImageFormat.Jpeg);
I suppose I could build some kind of check to see if the image has changed, and simply don't save it if it hasn't, but that feels like a cheap workaround. I must be doing something wrong, perhaps not disposing some object properly?
What can cause this error?




Reply With Quote