What about this:
private void RotateAndSaveImage(String input, String output)
{
//create an object that we can use to examine an image file
using (Image img = Image.FromFile(input))
{
//rotate the picture by 90 degrees and re-save the picture as a Jpeg
img.RotateFlip(RotateFlipType.Rotate90FlipNone);
img.Save(output, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
Related Contents:
- Load a WPF BitmapImage from a System.Drawing.Bitmap
- Convert a bitmap into a byte array
- Why must “stride” in the System.Drawing.Bitmap constructor be a multiple of 4?
- Convert an image to grayscale
- Fast work with Bitmaps in C#
- Copying From and To Clipboard loses image transparency
- fast converting Bitmap to BitmapSource wpf
- How to create bitmap from byte array?
- C# “Parameter is not valid.” creating new bitmap
- Converting BitmapImage to Bitmap and vice versa
- Is there a good way to convert between BitmapSource and Bitmap?
- What’s the difference between Bitmap.Clone() and new Bitmap(Bitmap)?
- Fastest way to convert Image to Byte array
- Create Bitmap from a byte array of pixel data
- What is the maximum resolution of C# .NET Bitmap?
- What is the fastest way I can compare two equal-size bitmaps to determine whether they are identical?
- Save and retrieve image (binary) from SQL Server using Entity Framework 6
- Serialize a Bitmap in C#/.NET to XML
- How to save PictureBox.Image to file?
- .Net and Bitmap not automatically disposed by GC when there is no memory left
- Generate 16-bit grayscale BitmapData and save to file
- How to draw on a zoomed image?
- Drawing a Long String on to a Bitmap results in Drawing Issues
- C# – Loading an indexed color image file correctly
- Cannot find Bitmap Class in Class Library (.NET Standard)
- WPF – converting Bitmap to ImageSource
- Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details [duplicate]
- What is the best way to check for Internet connectivity using .NET?
- Set focus on TextBox in WPF from view model
- Truncate Two decimal places without rounding
- C# Linq Group By on multiple columns [duplicate]
- Cannot use ref or out parameter in lambda expressions
- ServiceStack Request DTO design
- “A namespace cannot directly contain members such as fields or methods” [closed]
- Could not find a part of the path … bin\roslyn\csc.exe
- C# Store functions in a Dictionary
- right click context menu for datagridview
- Super-simple example of C# observer/observable with delegates
- How to pass a single object[] to a params object[]
- How to prevent blank xmlns attributes in output from .NET’s XmlDocument?
- How to hide an inherited property in a class without modifying the inherited class (base class)?
- C# Java HashMap equivalent
- How to unapply a migration in ASP.NET Core with EF Core
- Is there a standard way to encode a .NET string into JavaScript string for use in MS Ajax?
- Why generic IList does not inherit non-generic IList
- Changing startup form in C#
- Entity Framework core – Contains is case sensitive or case insensitive?
- How to ‘foreach’ a column in a DataTable using C#?
- How do I use the Decorator Pattern with Unity without explicitly specifying every parameter in the InjectionConstructor
- Why are public fields faster than properties?