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




Changes the hue, saturation and brightness of all colors or specific colors in the image.

Object Model


Syntax

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

Example

Visual BasicCopy Code
ImageProcessing.Color.ChangeHueSaturationIntensityCommand
   Public Sub ChangeHueSaturationIntensityCommandExample()
      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 ChangeHueSaturationIntensityCommand = New ChangeHueSaturationIntensityCommand
      Dim Data() As ChangeHueSaturationIntensityCommandData
      ReDim Data(0)

      Data(0) = New ChangeHueSaturationIntensityCommandData
      Data(0).Hue = 18000
      Data(0).Saturation = 0
      Data(0).Intensity = 0
      Data(0).OuterLow = 315
      Data(0).OuterHigh = 45
      Data(0).InnerLow = 345
      Data(0).InnerHigh = 15
      command.Data = Data
      command.Hue = 0
      command.Saturation = 0
      command.Intensity = 0

      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.ChangeHueSaturationIntensityCommand 
      public void ChangeHueSaturationIntensityCommandExample() 
      { 
         // 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 
         ChangeHueSaturationIntensityCommand command    = new ChangeHueSaturationIntensityCommand(); 
         ChangeHueSaturationIntensityCommandData[] data = new ChangeHueSaturationIntensityCommandData[1]; 
         data[0]            = new ChangeHueSaturationIntensityCommandData(); 
         data[0].Hue        = 18000; 
         data[0].Saturation = 0; 
         data[0].Intensity  = 0; 
         data[0].OuterLow   = 315; 
         data[0].OuterHigh  = 45; 
         data[0].InnerLow   = 345; 
         data[0].InnerHigh  = 15; 
         command.Data       = data; 
         command.Hue        = 0; 
         command.Saturation = 0; 
         command.Intensity  = 0; 
 
         command.Run(image); 
         codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
 
         RasterCodecs.Shutdown(); 
      }

Remarks

For more information, refer to Changing Brightness and Contrast.
For more information, refer to Correcting Colors.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Color.ChangeHueSaturationIntensityCommand

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