The short answer will be to try open the file, if failed, wait for a few seconds and try again, loop until success or timeout.
However, if you are updating these images a lot, you're really defeating IIS's caching mechanisms here. And it is not healthy for the web server to be serving files that are constantly changing. Web servers are great at serving static files.
Now if your images are so dynamic, perhaps you'll need to serve it through a server-side program instead. Generate your images (or read it from another program via remoting or WCF) and serve it. Your server-side program may also do some form of caching. No need even to keep an image file if it only lasts a very short time.
If you only need to replace those images occasionally, then it is ok to keep retrying.
Now if those images are really important, and you really would like IIS to stop serving the old version as soon as you have a new version (are you serving a CAPTCHA?), and IIS is serving this same file many many times per second, then your process may not be able to find a slot in. Then you'll either need to find a way to tell IIS to stop and wait for the new version -- restarting it should work, since you are not changing images often (otherwise, you'd have gone with the dynamic route).