|
-
December 23rd, 2009, 05:40 PM
#1
ExternalException - A generic error occurred in GDI+
I am loading an image into a picturebox using
picturebox1.Image = Image.FromFile()
and saving it by using
Bitmap bm = new Bitmat(pictureBox1.Image);
bm.Save(FileName, ImageFormat.Bmp);
It works perfectly fine when creating a new file, but the moment you try to replace the existing image I get thrown a
"ExternalException was unhandled - A generic error occurred in GDI+."
Anythoughts on what I am doing wrong? Being able to replace the existing file is an important step in my program.
Alright, I think i solved it by loading the image into a filestream, then loading the filestream into the picturebox.
Last edited by ssice; December 23rd, 2009 at 08:15 PM.
Reason: Problem Solved
-
January 1st, 2010, 11:40 AM
#2
Re: ExternalException - A generic error occurred in GDI+
Srange solution, isn't it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|