title: Save image after modifying metadata
body: <p>I have a problem saving an image after having its metadata modified.
  Basically, I want to open my image, display it, modify its EXIF metadata and than save it.</p>
  
  <p>First, I had a problem trying to save my image because the original file was locked (I had a generic GTI+ error). After reading some posts here and finding what was the problem, I solved the lock problem with the using keyword.</p>
  
  <p>But the problem is that if I use "using", the propertyItems list of my Image is empty and I can't modify my metadata.</p>
  
  <p>Here is how I load my image (with different tests)</p>
  
  <pre><code>this.image = new Bitmap(this.path);         // this cause lock on file
  
  /* the following doesn't lock the file, but image.propertyItems is empty */
  
  //using (var bmpTemp = new Bitmap(this.path))
  //{
  //    this.image = new Bitmap(bmpTemp);
  //}
  </code></pre>
  
  <p>Using streamReader or MemoryStream doesn't help...</p>
  
  <p>And here is how I modify and save my Image:</p>
  
  <pre><code> PropertyItem p = this.photo.Image.GetPropertyItem(0x5090);
  
   p.Id = 0x320;
   p.Type = 2; // Type ASCII
   p.Len = boxTitle.Text.Length;
   p.Value = Encoding.ASCII.GetBytes(boxTitle.Text);
  
   this.photo.Image.SetPropertyItem(p);
   this.photo.Image.Save(this.photo.Path);
  </code></pre>
  
  <p>Can you explain me why there's no propertyItems when I use "using", and how can I do to modify the image metadata's and than save it ?</p>