Cant save image

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
When i try to re save this image i get the error"A generic error occurred in GDI+."
here is the codepictureBox1.Image = Image.FromFile(@"C:UsersBobPicturesNew folder1.png");
Bitmap largeBmp = new Bitmap(pictureBox1.Image, 64, 128);

Bitmap smallBmp = new Bitmap(@"C:UsersBobPicturesNew folder2.png");
Graphics g = Graphics.FromImage(largeBmp);
g.CompositingMode = CompositingMode.SourceCopy;


g.DrawImage(smallBmp, new Point(0, 64));

g.Dispose();


largeBmp.Save(@"C:UsersBobPicturesNew folder1.png");

View the full article
 

Similar threads

Back
Top