VintaSoft Imaging .NET SDK v8.7
In This Topic
    Processing command features
    In This Topic

    Each processing command has the following features:

    1. One command, multiple images. You can apply single command to some images.

      Example:
      ' The project, which uses this code, must have references to the following assemblies:
      ' - Vintasoft.Imaging
      
      Dim command As New Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness)
      command.ExecuteInPlace(image1)
      command.ExecuteInPlace(image2)
      command.ExecuteInPlace(image3)
                    
      
      // The project, which uses this code, must have references to the following assemblies:
      // - Vintasoft.Imaging
      
      Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand command = 
          new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness);
      command.ExecuteInPlace(image1);
      command.ExecuteInPlace(image2);
      command.ExecuteInPlace(image3);
                      
      

    2. Region of interest. Image processing command can be applied not only to the image entirely, but to the specified region of the image. Such commands derives from the ImageProcessingCommandWithRegion class and have the RegionOfInterest property.

      Example:
      ' The project, which uses this code, must have references to the following assemblies:
      ' - Vintasoft.Imaging
      
      Dim command As New Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness)
      command.RegionOfInterest = New Vintasoft.Imaging.RegionOfInterest(selectedArea)
      command.ExecuteInPlace(image)
                    
      
      // The project, which uses this code, must have references to the following assemblies:
      // - Vintasoft.Imaging
      
      Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand command = 
          new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness);
      command.RegionOfInterest = new Vintasoft.Imaging.RegionOfInterest(selectedArea);
      command.ExecuteInPlace(image);
                      
      

    3. Progress control. During execution, image processing command raises Started, Progress, Canceled and Finished event to provide status of the command. By handling Started and Progress events you can stop execution of the command.

      Example:
      ' The project, which uses this code, must have references to the following assemblies:
      ' - Vintasoft.Imaging
      
      Public Sub ChangeBrightnessWithProgress()
          Dim command As New Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness)
          AddHandler command.Progress, New System.EventHandler(Of Vintasoft.Imaging.ImageProcessing.ImageProcessingProgressEventArgs)(AddressOf command_Progress)
          command.ExecuteInPlace(image)
      End Sub
      
      Private Sub command_Progress(sender As Object, e As Vintasoft.Imaging.ImageProcessing.ImageProcessingProgressEventArgs)
          System.Console.WriteLine(e.Progress)
          e.Cancel = True
      End Sub
                    
      
      // The project, which uses this code, must have references to the following assemblies:
      // - Vintasoft.Imaging
      
      public void ChangeBrightnessWithProgress()
      {
          Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand command = 
              new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand(Brightness);
          command.Progress += 
              new System.EventHandler<Vintasoft.Imaging.ImageProcessing.ImageProcessingProgressEventArgs>(command_Progress);
          command.ExecuteInPlace(image);
      }
      
      private void command_Progress(object sender, Vintasoft.Imaging.ImageProcessing.ImageProcessingProgressEventArgs e)
      {
          System.Console.WriteLine(e.Progress);
          e.Cancel = true;
      }
                      
      

    4. Processing modes.
      Command can directly process (modify) the source image ("in-place" processing) - in this case the ExecuteInPlace method must be used.
      Also command can create clone of the source image, process clone and return as a result - in this case the Execute method must be used.

    5. Inheritance. You can create custom processing command from scratch or by extending any existing processing command. All VintaSoft image processing commands are inherited from Vintasoft.Imaging.ImageProcessing.ProcessingCommandBase class.