Leadtools.ImageProcessing.Color Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
ContrastBrightnessIntensityCommand Constructor(Int32,Int32,Int32)
See Also  Example




contrast
Value that refers to the histogram stretching amount. It represents the amount of contrast change. The contrast ranges from -1000 to +1000. This value is divided internally by 1000. A positive value increases the contrast whereas a negative value decreases the contrast.
brightness
Value that refers to colors intensities scale factor. It indicates the amount of brightness change. The brightness ranges from -1000 to 1000. This value is divided internally by 1000. A positive value increases (or lightens) the brightness of the image image. A negative value decreases (or darkens) the brightness of the image image.
intensity
Value that refers to colors intensities shifting amount. It indicates the amount of intensity change. The intensity ranges from -1000 to +1000. This value is divided internally by 1000. A positive value lightens the brightness pixels whereas a negative value darkens the brightness pixels.
Initializes a new ContrastBrightnessIntensityCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal contrast As Integer, _
   ByVal brightness As Integer, _
   ByVal intensity As Integer _
)
Visual Basic (Usage)Copy Code
Dim contrast As Integer
Dim brightness As Integer
Dim intensity As Integer
 
Dim instance As ContrastBrightnessIntensityCommand(contrast, brightness, intensity)
C# 
public ContrastBrightnessIntensityCommand( 
   int contrast,
   int brightness,
   int intensity
)
Managed Extensions for C++ 
public: ContrastBrightnessIntensityCommand( 
   int contrast,
   int brightness,
   int intensity
)
C++/CLI 
public:
ContrastBrightnessIntensityCommand( 
   int contrast,
   int brightness,
   int intensity
)

Parameters

contrast
Value that refers to the histogram stretching amount. It represents the amount of contrast change. The contrast ranges from -1000 to +1000. This value is divided internally by 1000. A positive value increases the contrast whereas a negative value decreases the contrast.
brightness
Value that refers to colors intensities scale factor. It indicates the amount of brightness change. The brightness ranges from -1000 to 1000. This value is divided internally by 1000. A positive value increases (or lightens) the brightness of the image image. A negative value decreases (or darkens) the brightness of the image image.
intensity
Value that refers to colors intensities shifting amount. It indicates the amount of intensity change. The intensity ranges from -1000 to +1000. This value is divided internally by 1000. A positive value lightens the brightness pixels whereas a negative value darkens the brightness pixels.

Example

Visual BasicCopy Code
ImageProcessing.Color.ContrastBrightnessIntensityCommand.ContrastBrightnessIntensityConstructor
   Public Sub ContrastBrightnessIntensityConstructorExample()
      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 ContrastBrightnessIntensityCommand = New ContrastBrightnessIntensityCommand(-146, 200, 310)
      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.ContrastBrightnessIntensityCommand.ContrastBrightnessIntensityConstructor 
      public void ContrastBrightnessIntensityConstructorExample() 
      { 
         // 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 
         ContrastBrightnessIntensityCommand command = new ContrastBrightnessIntensityCommand(-146, 200, 310); 
         command.Run(image); 
         codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
 
         RasterCodecs.Shutdown(); 
      }

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