1

I'm trying to save a image into a local drive using Image.Save method. It works fine in other OS but I see only problem in Win7.

In Win7 it can't overwrite existing images, even it does not throw any error. Possibly it's a bug in Win7 as I see a related hot fix here http://support.microsoft.com/kb/2028610 .

But this hot fix doesn't solve my problem. If anyone have encountered same issue please let me know.

Thanks.

Teoman Soygul
  • 25,584
  • 6
  • 69
  • 80
Pritam Karmakar
  • 2,773
  • 5
  • 30
  • 49
  • Do you happen to be viewing the result images in an application that might cache them, such as IE? – Chris Farmer May 23 '11 at 19:26
  • Have a look at this answer from another SO thread: http://stackoverflow.com/questions/2340337/how-can-i-get-net-to-save-this-image/2350569#2350569 – Cᴏʀʏ May 23 '11 at 19:28

3 Answers3

1

This is sort of a workaround, but can you delete the existing image first? System.IO.File.Delete(path) before the save should give you more info.

Mark Avenius
  • 13,679
  • 6
  • 42
  • 50
0

You probably need elevated privileges.

See here Windows 7 and Vista UAC - Programmatically requesting elevation in C#

Community
  • 1
  • 1
Bob G
  • 1,226
  • 2
  • 16
  • 24
0

What folder are you trying to save it to? The root folder of your C: drive? Win7 is fickle about programmitcally saving files to the root folder of a drive. Try saving it to a folder off of the root and see if that helps.

Andy Evans
  • 6,997
  • 18
  • 72
  • 118