Avi Avi -4 years ago 286
C# Question

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

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?

Answer Source

Use the rotate flip method.


        Bitmap bitmap1 = (Bitmap)Bitmap.FromFile(@"C:\test.jpg");
        bitmap1.Save(@"C:\Users\Public\Documents\test rotated.jpg");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download