how to rotate image in File in C# & WPF application

c#, image, transformation, wpf

Solution

Use the rotate flip method.

E.g.:

        Bitmap bitmap1 = (Bitmap)Bitmap.FromFile(@"C:\test.jpg");
        bitmap1.RotateFlip(RotateFlipType.Rotate180FlipNone);
        bitmap1.Save(@"C:\Users\Public\Documents\test rotated.jpg");

Problem

I have WPF and C# application. which captures the images and Save in to file(*.jpg). I have the image path and i want to rotate image saved in File through the c# code. and Save the Rotated image in same file. How can i do that?

Original source