How to overwrite an existing image with c#?
<p>To save an image I use the following code:  </p>

<pre><code> string filenamewithpath =
      System.Web.HttpContext.Current.Server.MapPath(
           @"~/userimages/" + incID + ".jpg");
 System.IO.File.WriteAllBytes(filenamewithpath, Util.ReadFully(image));


public class Util
    {
        public static byte[] ReadFully(Stream stream)
        {
            byte[] buffer = new byte[32768];
            using (MemoryStream ms = new MemoryStream())
            {
                while (true)
                {
                    int read = stream.Read(buffer, 0, buffer.Length);
                    if (read &lt;= 0)
                        return ms.ToArray();
                    ms.Write(buffer, 0, read);
                }
            }
        }
    }
</code></pre>

<p>The above works for saving the image with an ID. When updating, I need to overwrite the existing image, and would need some advice on how to do this.</p>
