Initializes a new HistogramCommand class object with explicit parameters.
            
            
            
            
 Syntax
Syntax
            Parameters
- channel
- Flags that indicate the channel for which 
            to get the histogram and the bits to use in calculating the histogram.
 
            
            
            
            
             Example
Example
| Visual Basic |  Copy Code | 
|---|
| ImageProcessing.Color.HistogramCommand.HistogramConstructorPublic Sub HistogramConstructorExample()
 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")
 
 
 Dim command As HistogramCommand = New HistogramCommand(HistogramCommandFlags.Red Or HistogramCommandFlags.AllBits)
 command.Run(leadImage)
 codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)
 
 Dim histogramValues() As Integer = command.Histogram
 
 RasterCodecs.Shutdown()
 End Sub
 | 
| C# |  Copy Code | 
|---|
| ImageProcessing.Color.HistogramCommand.HistogramConstructor public void HistogramConstructorExample()
 {
 // 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
 HistogramCommand command = new HistogramCommand(HistogramCommandFlags.Red | HistogramCommandFlags.AllBits);
 command.Run(image);
 codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24);
 //This is where the histogram information strored
 int [] histogramValues = command.Histogram;
 
 RasterCodecs.Shutdown();
 }
 | 
 Requirements
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
See Also