Rotate and flip image files in C# and VB.NET

The following example shows how you can easily rotate an image by 90 degrees and flip it horizontally using the GemBox.Imaging library in C# and VB.NET.

Upload your file (Drag file here)
using GemBox.Imaging;

// If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");

using (var image = Image.Load("Parrot.png"))
{
// Rotate the image by 90 degrees and flip it horizontally.
image.RotateFlip(RotateFlipType.Rotate90FlipX);

// Save the rotated and flipped image.
image.Save("RotatedFlipped.png");
}
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("Parrot.png")
' Rotate the image by 90 degrees and flip it horizontally.
image.RotateFlip(RotateFlipType.Rotate90FlipX)

' Save the rotated and flipped image.
image.Save("RotatedFlipped.png")
End Using

End Sub

End Module
Image file which is rotated/flipped using GemBox.Imaging
Screenshot of an image file rotated and flipped using GemBox.Imaging

Please check the RotateFlipType enumeration for a full list of supported rotate and flip values.

Next steps

GemBox.Imaging is a .NET library that provides an easy way to load, edit, save images. GemBox.Imaging also supports file format conversions and image transformations (resize, crop, rotate and flip).