Overwrite image

A

Arjen

Hi,

I read an image:
Image originalBitmap = Image.FromFile("C:\temp\123.jpg", true);

Make a resized copy of it:
Image result = originalBitmap.GetThumbnailImage(100, 200, null,
IntPtr.Zero);

And save it under the original name:
result.Save("C:\temp\123.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

Well, this does not work. Does this mean I have to close something first?
Can and how can I use the using statement here?
I need to save the file under te same name (overwrite)... can someone help?

Thanks!
Arjen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top