title: Rotate a BitmapImage
body: <p>I want to rotate a bitmap image I wrote some code and it work </p>
  
  <pre><code>TransformedBitmap TempImage = new TransformedBitmap();
  
  TempImage.BeginInit();
  TempImage.Source = MyImageSource; // MyImageSource of type BitmapImage
  
  RotateTransform transform = new RotateTransform(90);
  TempImage.Transform = transform;
  TempImage.EndInit();
  
  image1.Source = TempImage;
  </code></pre>
  
  <p>but I want that MyImageSource get this modification, because like that if I click again in the button nothing happen and this normal it get the first form of my image, and also I want it to take this form because I have to save it after modification. </p>
  
  <p>why I have to do this:</p>
  
  <p>I have some tiff image to read some of them can be not in the right form I want to add flip 90° the user click on it until the image return to the right form and when he click on flip the image will be saved(replaced) on disk in the actual form chosen by user</p>