Guide for C#
Core Document Formats
Additional Features
Image Rotating

C# Imaging - Rotate Image in C#.NET

Visual C# .NET Image Rotator SDK for Image Rotating by C# Code

Visual C#
Home > .NET Imaging SDK > C# > Rotate Image
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

C#.NET Image Rotation SDK Overview
RasterEdge Image Rotator Library Control is an advanced imaging toolkit, which is designed to help .NET developers achieve fast and accurate image rotation from 1 to 360 degrees using Visual C# programming code. Using this C#.NET image rotator component SDK, C# developers can rotate source image file with 1 degree increments in any .NET class applications, including ASP.NET web-based application and Windows Forms project.
From this online tutorial page for C#.NET image rotation SDK, you will find information on following aspects.
  • Brief benefit list of RasterEdge C#.NET image rotator control toolkit
  • Guide for starting C#.NET image rotating application using RasterEdge Image Rotator Add-on
  • C# method for image rotation in .NET class applications
  • How to rotate source image using C# demo code
  • C#.NET image rotating control FAQs
C# Image Rotation Control Benefits
  • 100% managed .NET solution for fast image rotation by using C# programming code
  • Able to rotate source image file within 360 degrees using most easy-to-use C# image rotating method
  • Support image rotation with minimum 1 degree increments in C#.NET class application
  • Own high-compatibility with .NET Framework 2.0 and above versions
This C# image rotating control toolkit is actually a part of RasterEdge DocImage SDK for .NET which provides multiple powerful image processing controls. Therefore, if you want to perform other advanced imaging effects on source image file in Visual C# programming method, like adding watermark to target image, creating thumbnail for source image, flipping image and cropping image, this strong C#.NET imaging SDK is also a great choice for you.
Rotate Image in C#.NET Application
In this part, we will guide you to integrate RasterEdge image rotating control into your C#.NET imaging application step by step. But before you follow the guidance below, please check whether your C#.NET developing application is compatible with the minimum installation requirement of RasterEdge DocImage SDK for .NET. (If you want to rotate image using VB.NET class code, please read the online tutorial page for image rotation in VB.NET class application.)
  1. Download RasterEdge DocImage SDK for .NET and find following dlls which are used to rotate image in C#.NET class application;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.Processing.dll
  2. Open or create a C#.NET class project and integrate above mentioned C# image rotating control dlls as project references;
  3. Find and run the executive application file "RasterEdge.Imaging License Manager.exe" in the downloaded trial package;
  4. Copy created "RasterEdgeLicense.txt" to the bin folder of your C#.NET class project where you can find above integrated RasterEdge image rotating dlls;
  5. Declare the Namespace of RasterEdge Image Rotation SDK;
  6. You are now able to rotate your source image by copying the sample C# code (which you can find in later section).
C#.NET Method for Image Rotation
In this part, we show the method that RasterEdge Image Rotation SDK has used to rotate target image file. Using this C# RasterEdge image rotating method, developers can rotate source image by any defined degree (1 - 360 degrees). The rotation angle is measured clockwise from the X-axis. And the center of rotation is the right-bottom point of target image file.
public static int ApplyRotate(REImage img, int deg);
Demo C# Code for Image Rotation
The demo C# code below is used to illustrate how to rotate source image with a user-defined angle and how to save rotated image as a new image object in C#.NET class applications.
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.Basic.Codec;

namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string fileName = "c:/Sample.png";

REImage reImage = REFile.OpenImageFile(fileName);

ImageProcessing.ApplyRotate(reImage, 60);

REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
}
}
}
C#.NET Image Rotator Control FAQs
Q: Can I rotate a batch of images, pictures or photos at once using RasterEdge C#.NET Image Rotator Control Add-on?
A: Sorry, the current version of RasterEdge Visual C# .NET Image Rotator Control Add-on can only support rotating one image at a time and the batch mode for image rotation is not yet supported.
See More Visual C# Image Project Tutorials


Recommend this to Google+