Leadtools.ImageProcessing.Color Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
AdjustTintCommand Class
See Also  Members   Example 




Adjusts the image tint by changing the colors in an image by using two separate color wheel rotations. This command is available in the Raster Pro and above toolkits.

Syntax

Visual Basic (Declaration) 
Public Class AdjustTintCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As AdjustTintCommand
C# 
public class AdjustTintCommand : RasterCommand, IRasterCommand  
Managed Extensions for C++ 
public __gc class AdjustTintCommand : public RasterCommand, IRasterCommand  
C++/CLI 
public ref class AdjustTintCommand : public RasterCommand, IRasterCommand  

Example

Visual BasicCopy Code
ImageProcessing.Color.AdjustTintCommand
   Public Sub AdjustTintCommandExample()
      RasterCodecs.Startup()
      Dim codecs As New RasterCodecs()
      codecs.ThrowExceptionsOnInvalidImages = True

      Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")

      ' Prepare the command
      Dim command As AdjustTintCommand = New AdjustTintCommand
      command.AngleA = -50
      command.AngleB = 1500
      command.Run(leadImage)
      codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Color.AdjustTintCommand 
      public void AdjustTintCommandExample() 
      { 
         // Load an image 
         RasterCodecs.Startup(); 
         RasterCodecs codecs = new RasterCodecs(); 
         codecs.ThrowExceptionsOnInvalidImages = true; 
 
         RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); 
 
         // Prepare the command 
         AdjustTintCommand command = new AdjustTintCommand(); 
         command.AngleA = -50; 
         command.AngleB = 1500; 
         command.Run(image); 
         codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

  • This command changes the colors in an image by using two separate color wheel rotations. For the AdjustTintCommand.AngleA parameter, a positive rotation takes blue toward green and red, as shown in the following figure:

    Negative rotation has the opposite effect. For the AdjustTintCommand.AngleB parameter, a positive rotation takes red toward green. Negative rotation has the opposite effect.
  • This command supports only colored images.
  • This command supports 48 and 64-bit color images. Support for 48 and 64-bit color images is available only in the Document/Medical toolkits.
  • This command does not support signed data images.
  • Use the ChangeHueCommand to rotate the color wheel in either direction using one angle change that changes each color in the image. A 180-degree rotation in either direction changes each color to its complement. Positive rotation takes red toward green, green toward blue, and blue toward red. Negative rotation has the opposite effect.
  • This command does not support 32-bit grayscale images.
For more information, refer to Removing Noise.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Color.AdjustTintCommand

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also