Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm having problems trying to resave an image.

 

I'm importing an image into a picturebox using the open file dialog box. I'm 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, i'm 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!

Posted

Let's see if I can explain this.....

 

If it's 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+."

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...