How to save a bitmap
<p>In WPF I have a Bitmap coming from a library which deals with my webcam</p>

<pre><code>Bitmap bmp = webCameraControl.GetCurrentImage();
</code></pre>

<p>now I have to save it but bmp.Save("C:/img.jpg"); fails
So I tried </p>

<pre><code>bmp.Save("C:/img.jpg", ImageFormat.Jpeg);
</code></pre>

<p>but it didn't work and got</p>

<blockquote>
  <p>"Generic GDI+ error".</p>
</blockquote>

<p>Thanks </p>

<p>---ADD---</p>

<p>So if I put</p>

<pre><code>bmp.Save("C:\\img.jpg", ImageFormat.Jpeg);
bmp.Save(@"C:\img.jpg", ImageFormat.Jpeg); 
</code></pre>

<p>I get error.
But if I put</p>

<pre><code>bmp.Save("img.jpg", ImageFormat.Jpeg); 
</code></pre>

<p>That works!! I can't understand!=?!?</p>