Rotate/Flip image files in C# and VB.NET
With GemBox.Imaging, you can rotate/flip image files from your C# or VB.NET application.
To rotate an image using GemBox.Imaging, you can specify how much an image is rotated and the axis used to flip the image. Check all the FlipTypes
you can use while working with this component.
The following example shows how you can easily rotate/flip an image at 90 degrees using C# and VB.Net and save it to various formats.

using GemBox.Imaging;
class Program
{
static void Main()
{
// If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
using (var image = Image.Load("%InputFileName%"))
{
// Rotating the image
image.RotateFlip(RotateFlipType.Rotate90FlipNone);
// Saving the rotated image
image.Save("RotatedFlipped.png");
}
}
}
Imports System
Imports GemBox.Imaging
Module Program
Sub Main()
' If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY")
Using image As Image = Image.Load("%InputFileName%")
' Rotating the image
image.RotateFlip(RotateFlipType.Rotate180FlipY)
' Saving the rotated image
image.Save("RotatedFlipped.png")
End Using
End Sub
End Module
See also
Next steps
Published: September 14, 2022 | Modified: December 19, 2022 | Author: Ercan Görgülü