public int Angle { get; set; } @property (nonatomic, assign) NSInteger angle; public int getAngle();public void setAngle(int intValue);
Angle # get and set (HighQualityRotateCommand)
Hundredths of degrees to rotate (+/-). This can be a number from 1 to 36,000. A positive value will rotate the image in a clockwise rotation, while a negative value will rotate the image in a counter-clockwise rotation.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;public void HighQualityRotateCommandExample(){RasterCodecs codecs = new RasterCodecs();// Get an imagestring tifFileName = Path.Combine(LEAD_VARS.ImagesDir, "ocr1.tif");string normalRotateFileName = Path.Combine(LEAD_VARS.ImagesDir, "ocr1_NormalRotated.tif");string highQualityRotateFileName = Path.Combine(LEAD_VARS.ImagesDir, "ocr1_HighQualityRotated.tif");int angle = 30 * 100;RasterColor fillColor = RasterColor.FromKnownColor(RasterKnownColor.White);// Load the image, rotate normally by 30 degrees and saveusing (RasterImage image = codecs.Load(tifFileName)){RotateCommand cmd = new RotateCommand();cmd.Angle = angle;cmd.Flags = RotateCommandFlags.Resize | RotateCommandFlags.Bicubic;cmd.FillColor = fillColor;cmd.Run(image);codecs.Save(image, normalRotateFileName, image.OriginalFormat, image.BitsPerPixel);}// Load the image, rotate with high quality by 30 degrees and saveusing (RasterImage image = codecs.Load(tifFileName)){HighQualityRotateCommand cmd = new HighQualityRotateCommand();cmd.Angle = angle;cmd.Flags = HighQualityRotateCommandFlags.Resize | HighQualityRotateCommandFlags.BestQuality;cmd.FillColor = fillColor;cmd.Run(image);codecs.Save(image, highQualityRotateFileName, image.OriginalFormat, image.BitsPerPixel);}// Now compare the saved TIF files and notice the difference in quality between// the normal rotate and high qualitycodecs.Dispose();}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
