C Solutions Products
C Solutions Home Page
Dotnet Graphic Toolbox
Encryptinator
Digital Frame Filler
Diph


Bookmark and Share
Follow us on Facebook

Share   
 

ASP.NET Image Rotate

 

   Having images you need to rotate in ASP.NET can be a pain.  You may have some images you need to allow users to upload, but, some may need to be rotate. We are here to help.

   With DotNet Graphic Toolbox you can rotate images with ease. Additionally, you can submit your image to it as a filename, or, as a binary array. Also, the output can be set to be either a file, or, as a binary array.


Click the button below to download a free trial of Dotnet Graphic Toolbox.
Download

Need help resizing images, especially to fit into a certain sized area? We can help with that too. Click here to learn more about how we can help resize your images to fit within a maximum sized area.



Client Testimonials

Here's what just one of our happy customers has to say about DotNet Graphic Toolbox:



This Dotnet Graphic Toolbox has literally saved me time and money. To be completely honest, I have spent the past two months searching for a simple tool that could resize all my pictures and post them to any destination that I chose. And at the same time, giving me the capability of controlling other aspects like the width and height. After trying this tool, I was hooked! The search was finally over!

This tool was very simple and easy to implement in my own code and delivered remarkable results. I was amazed with this tool.

The gentleman from tech support who promptly answered all my questions was Chris Conley. He is what I call a true “Professional." He listened and was very patient and polite. Just from our initial contact, I knew that he was very knowledgeable in this field. I could not have been any more impressed with his impeccable service.

Thank you Chris and thank you C Solutions, Inc for developing such an amazing tool.

Earl Reese, Miami, FL

 
 Image Needing Rotation Image After Applying Rotation
Oceanview Rotated 270 Degrees Oceanview
 
  

What coding is involved in doing this?

Coding the image rotation is easy with DotNet Graphic Toolbox. Below is sample code in C# and VB.NET.

With our system, you can rotate images by 90 degrees clockwise, 90 degrees counter clockwise, as well as 180 degrees.

How much does it cost?

   To find out our current pricing, click here.

 

 

Note: In order to make the samples work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox. Additionally, all of the examples below are fully functional, but, a watermark is added to all the outputted images. If you'd like to have the watermark removed, simply purchase a registration code. After you buy a license, the registration code will be sent to you. In your code, simply put in the registration code where we have 'DEMO' in the examples, below.


Want to Rotate an Image, given a filename, and output the result to a file? (Standard Version Feature)

Sample C# Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

CSolutions.clsDotnetGraphicToolbox cDGT_Demo = new CSolutions.clsDotnetGraphicToolbox("Demo");

string sDirName = @"E:\Directory-With-Image";

string sFileName = sDirName + @"\Source-Image.JPG";

string sFileNameRotated = sDirName + @"\Source-Image--ROTATED.JPG";

cDGDemo.RotateImageFileAndSaveAsJPEG(sFileName, sFileNameRotated, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.RotateCounterClockWise90Degrees);

Note: The rotated image is now available in the file at location designated by 'sFileNameRotated'.

 

Want to Rotate an Image, given a filename, and output the result to a file? (Basic Version Feature)

Sample VB.NET Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

Dim cDGT_Demo As New CSolutions.clsDotnetGraphicToolbox("Demo")

Dim sDirName As String = "E:\Directory-With-Image"

Dim sFileName As String = sDirName + "\Source-Image.JPG"

Dim sFileNameRotated_Demo As String = sDirName + "\Source-Image-ROTATED-DEMO.JPG"

cDGT_Demo.RotateImageFileAndSaveAsJPEG(sFileName, sFileNameRotated_Demo, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.RotateClockWise90Degrees)

 


Want to Rotate an Image, given an image file, and output the result to a Binary Array? (Pro Version Feature)

Sample C# Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

CSolutions.clsDotnetGraphicToolbox cDGT_Demo = new CSolutions.clsDotnetGraphicToolbox("Demo");

string sDirName = @"E:\Directory-With-Image";

string sFileName = sDirName + @"\Output.JPG";

byte[] byteTarget = null;

cDGT_Demo.RotateImageFileAndSaveAsJPEGBinaryArray(sFileName, ref byteTarget, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.RotateClockWise90Degrees);

Note: The rotated image is now available in the byte array in 'byteTarget'.

 

Want to Rotate an Image, given an image file, and output the result to a Binary Array? (Pro Version Feature)

Sample VB.NET Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

Dim cDGT_Demo As New CSolutions.clsDotnetGraphicToolbox("Demo")

Dim sDirName As String = "E:\Directory-With-Image"

Dim sFileName As String = sDirName + "\Output.JPG"

Dim sTargetFileName As String = sDirName + "\Output-File-ToJPEG.JPG"

Dim byteTarget As Byte() = Nothing

cDGT_Demo.RotateImageFileAndSaveAsJPEGBinaryArray(sFileName, byteTarget, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.RotateClockWise90Degrees)

Note: The rotated image is now available in the byte array in 'byteTarget'.

 


Want to Rotate an Image, given an image as a Binary Array, and output the result to a file? (Pro Version Feature)

Sample C# Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

CSolutions.clsDotnetGraphicToolbox cDGT_Demo = new CSolutions.clsDotnetGraphicToolbox("Demo");

string sDirName = @"E:\Directory-With-Image";

stringsFileName = sDirName + @"\Output.JPG";

string sFileNameRotated = sDirName + @"\Output--ROTATED.JPG";

byte[] bytez = System.IO.File.ReadAllBytes(sFileName); // NOTE, THE IMAGE'S SOURCE COULD ALSO BE FROM A FILEUPLOAD CONTROL, DATABASE, ETC

cDGT_Demo.RotateBinaryImageAndSaveAsJPEGFile(bytez, sFileNameRotated, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.RotateClockWise90Degrees);

Note: The rotated image is now available in the file at location designated by 'sFileNameRotated'.

 

Want to Rotate an Image, given an image as a Binary Array, and output the result to a file? (Pro Version Feature)

Sample VB.NET Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

Dim cDGT_Demo As New CSolutions.clsDotnetGraphicToolbox("Demo")

Dim sDirName As String = "E:\Directory-With-Image"

Dim sFileName As String = sDirName + "\Output.JPG"

Dim sFileNameNew_BY_BA_Demo As String = sDirName + "\Output--ROTATED.JPG"

Dim bytez As Byte() = System.IO.File.ReadAllBytes(sFileName)

cDGT_Demo.RotateBinaryImageAndSaveAsJPEGFile(bytez, sFileNameNew_BY_BA_Demo, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.Rotate180Degrees)

 


Want to Rotate an Image, given an image as a Binary Array, and output the result to a Binary Array? (Pro Version Feature)

Sample C# Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

CSolutions.clsDotnetGraphicToolbox cDGT_Demo = new CSolutions.clsDotnetGraphicToolbox("Demo");

byte[] bytez = System.IO.File.ReadAllBytes(sFileName); // NOTE, THE IMAGE'S SOURCE COULD ALSO BE FROM A FILEUPLOAD CONTROL, DATABASE, ETC

byte[] byteTarget = null;

cDGT_Demo.RotateBinaryImageAndSaveAsJPEGBinaryArray(bytez, ref byteTarget, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.Rotate180Degrees);

Note: The rotated image is now available in the binary array 'byteTarget'.

 

Want to Rotate an Image, given an image as a Binary Array, and output the result to a Binary Array? (Pro Version Feature)

Sample VB.NET Code

In order to make the sample work, you need to add a reference to the DLL at 'CSolutions.clsDotnetGraphicToolbox' for the below code to work. Of course, you must install the DLL on your system, as well. Click here to install a free trial copy of DotNet Graphic Toolbox.

Dim cDGT_Demo As New CSolutions.clsDotnetGraphicToolbox("Demo")

Dim sDirName As String = "E:\Directory-With-Image"

Dim sFileName As String = sDirName + "\Output.JPG"

Dim sFileNameNew_BY_BA_Demo As String = sDirName + "\Output--ROTATED.JPG"

Dim bytez As Byte() = System.IO.File.ReadAllBytes(sFileName)

cDGT_Demo.RotateBinaryImageAndSaveAsJPEGFile(bytez, sFileNameNew_BY_BA_Demo, CSolutions.clsDotnetGraphicToolbox.enumRotateDirection.Rotate180Degrees)

Note: The rotated image is now available in the file at the location designated in 'sFileNameNew_BY_BA_Demo'.

 

 

   How much does it cost?

   To find out our current pricing, click here.

 

   Image Resizing

   Additionally, we can resize your images. Click here to learn more. 

 


Copyright C Solutions, Inc, 2000 - 2010
support@c-solutions-inc.com
(888) 802-1487
sales@c-solutions-inc.com