Saving Image

mikef74

Member
Joined
Jul 30, 2003
Messages
9
Im having problems trying to resave an image.

Im importing an image into a picturebox using the open file dialog box. Im saving all the text that was entered into a text file using streamwriter, and saving the image using image.save(pathname). Along with saving the text into a text file, im also adding an extra line that contains the path name for the image.

When opening the saved text file, it imports all the text into the correct fields, and using the path name it imports the image into the correct picturbox.

Now, all of that works just fine. BUT, the problem is, I cannot resave an image if it already exists.

Help!
 
Lets see if I can explain this.....

If its a new report, and I import a picture, I can save it all I want, with no errors. However, once I close it and reopen that report and try to save again, the text file saves no problem, but it blows up on the "image.save(pathname)" with an error... "A generic error occurred in GDI+."
 
Back
Top