←Select platform

HighQualityRotateCommand Constructor()

Summary
Initializes a new instance of the HighQualityRotateCommand class object with default parameters.
Syntax
C#
Objective-C
C++/CLI
Java
Python
- (instancetype)init 
public HighQualityRotateCommand(); 
public: 
HighQualityRotateCommand(); 
__init__() # Default constructor 
Remarks

The new HighQualityRotateCommand constructed will have Angle set to 0, Flags set to HighQualityRotateCommandFlags.Resize | HighQualityRotateCommandFlags.Fastest and FillColor set to White.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Core; 
 
public void HighQualityRotateCommandExample() 
{ 
   RasterCodecs codecs = new RasterCodecs(); 
 
   // Get an image 
   string 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 save 
   using (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 save 
   using (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 quality 
 
   codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.