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




Gets or sets a value that indicates whether the method will process the image.

Syntax

Visual Basic (Declaration) 
Public Property Flag As AutoColorLevelCommandFlags
Visual Basic (Usage)Copy Code
Dim instance As AutoColorLevelCommand
Dim value As AutoColorLevelCommandFlags
 
instance.Flag = value
 
value = instance.Flag
C# 
public AutoColorLevelCommandFlags Flag {get; set;}
Managed Extensions for C++ 
public: __property AutoColorLevelCommandFlags get_Flag();
public: __property void set_Flag( 
   AutoColorLevelCommandFlags value
);
C++/CLI 
public:
property AutoColorLevelCommandFlags Flag {
   AutoColorLevelCommandFlags get();
   void set (AutoColorLevelCommandFlags value);
}

Return Value

The method to process the image.

Example

Visual BasicCopy Code
ImageProcessing.Color.AutoColorLevelCommand.Flag
   Public Sub FlagPropertyExample()
      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 AutoColorLevelCommand = New AutoColorLevelCommand(AutoColorLevelCommandType.Intensity, AutoColorLevelCommandFlags.None)
      command.Flag = AutoColorLevelCommandFlags.NoProcess
      command.Type = AutoColorLevelCommandType.Level

      ' Apply "Auto Leveling" to the image.
      command.Run(leadImage)
      codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)

      MessageBox.Show("Master Leveling Value: " & Chr(13) & " Gamma: " & command.Master.Gamma & Chr(13) & _
         " Minimum Input: " & command.Master.MinimumInput & Chr(13) & _
         " Minimum Input: " & command.Master.MaximumInput & Chr(13) & _
         " Minimum Input: " & command.Master.MinimumOutput & Chr(13) & _
         " Minimum Input: " & command.Master.MaximumOutput)

      MessageBox.Show("Red Leveling Value: " & Chr(13) & " Gamma: " & command.Red.Gamma & Chr(13) & _
         " Minimum Input: " & command.Red.MinimumInput & Chr(13) & _
         " Minimum Input: " & command.Red.MaximumInput & Chr(13) & _
         " Minimum Input: " & command.Red.MinimumOutput & Chr(13) & _
         " Minimum Input: " & command.Red.MaximumOutput)

      MessageBox.Show("Green Leveling Value: " & Chr(13) & " Gamma: " & command.Green.Gamma & Chr(13) & _
         " Minimum Input: " & command.Green.MinimumInput & Chr(13) & _
         " Minimum Input: " & command.Green.MaximumInput & Chr(13) & _
         " Minimum Input: " & command.Green.MinimumOutput & Chr(13) & _
         " Minimum Input: " & command.Green.MaximumOutput)

      MessageBox.Show("Blue Leveling Value: " & Chr(13) & " Gamma: " & command.Blue.Gamma & Chr(13) & _
         " Minimum Input: " & command.Blue.MinimumInput & Chr(13) & _
         " Minimum Input: " & command.Blue.MaximumInput & Chr(13) & _
         " Minimum Input: " & command.Blue.MinimumOutput & Chr(13) & _
         " Minimum Input: " & command.Blue.MaximumOutput)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Color.AutoColorLevelCommand.Flag 
      public void FlagPropertyExample() 
      { 
         // 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 
         AutoColorLevelCommand command = new AutoColorLevelCommand(); 
         command.Flag = AutoColorLevelCommandFlags.NoProcess; 
         command.Type = AutoColorLevelCommandType.Level; 
 
         // Apply "Auto Leveling" to the image. 
         command.Run(image); 
 
         MessageBox.Show("Master Leveling Value: \n Gamma: " + command.Master.Gamma + "\n" + 
            " Minimum Input: " + command.Master.MinimumInput + "\n" + 
            " Minimum Input: " + command.Master.MaximumInput + "\n" + 
            " Minimum Input: " + command.Master.MinimumOutput + "\n" + 
            " Minimum Input: " + command.Master.MaximumOutput); 
 
         MessageBox.Show("Red Leveling Value: \n Gamma: " + command.Red.Gamma + "\n" + 
            " Minimum Input: " + command.Red.MinimumInput + "\n" + 
            " Minimum Input: " + command.Red.MaximumInput + "\n" + 
            " Minimum Input: " + command.Red.MinimumOutput + "\n" + 
            " Minimum Input: " + command.Red.MaximumOutput); 
 
         MessageBox.Show("Green Leveling Value: \n Gamma: " + command.Green.Gamma + "\n" + 
            " Minimum Input: " + command.Green.MinimumInput + "\n" + 
            " Minimum Input: " + command.Green.MaximumInput + "\n" + 
            " Minimum Input: " + command.Green.MinimumOutput + "\n" + 
            " Minimum Input: " + command.Green.MaximumOutput); 
 
         MessageBox.Show("Blue Leveling Value: \n Gamma: " + command.Blue.Gamma + "\n" + 
            " Minimum Input: " + command.Blue.MinimumInput + "\n" + 
            " Minimum Input: " + command.Blue.MaximumInput + "\n" + 
            " Minimum Input: " + command.Blue.MinimumOutput + "\n" + 
            " Minimum Input: " + command.Blue.MaximumOutput); 
 
         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