ImageViewerProcessingTool Class
In This Topic
Represents a visual tool for processing of rectangular area in image viewer.
Object Model
Syntax
'Declaration
Public Class ImageViewerProcessingTool
Inherits VisualTool
public class ImageViewerProcessingTool : VisualTool
public __gc class ImageViewerProcessingTool : public VisualTool*
public ref class ImageViewerProcessingTool : public VisualTool^
Remarks
This visual tool is faster than ImageProcessingTool because this tool processes only image region, which is visible in image viewer, and ImageProcessingTool always processes the whole image loaded in image viewer.
Example
This C#/VB.NET code shows how to add the visual tool, which changes brightness of visible area of image viewer, to the image viewer.
''' <summary>
''' Adds the visual tool, which changes brightness of visible area of image viewer, to the image viewer.
''' </summary>
''' <param name="imageViewer">The image viewer.</param>
''' <param name="imageBrightness">The image brightness value in percents. Valid values are from -100 to 100.</param>
Public Sub AddVisualToolForProcessingVisibleAreaInImageViewer(imageViewer As Vintasoft.Imaging.UI.ImageViewer, imageBrightness As Integer)
' create command for changing of image brightness
Dim changeBrightnessCommand As New Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand()
' set the command parameters
changeBrightnessCommand.Brightness = imageBrightness
' create an instance of the ImageViewerProcessingTool class
Dim imageViewerProcessingTool As New Vintasoft.Imaging.UI.VisualTools.ImageViewerProcessingTool()
' specify that visual tool must use the command for processing visible area in image viewer
imageViewerProcessingTool.ProcessingCommand = changeBrightnessCommand
' set the tool as the current tool of the ImageViewer
imageViewer.VisualTool = imageViewerProcessingTool
End Sub
/// <summary>
/// Adds the visual tool, which changes brightness of visible area of image viewer, to the image viewer.
/// </summary>
/// <param name="imageViewer">The image viewer.</param>
/// <param name="imageBrightness">The image brightness value in percents. Valid values are from -100 to 100.</param>
public void AddVisualToolForProcessingVisibleAreaInImageViewer(
Vintasoft.Imaging.UI.ImageViewer imageViewer,
int imageBrightness)
{
// create command for changing of image brightness
Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand changeBrightnessCommand =
new Vintasoft.Imaging.ImageProcessing.Color.ChangeBrightnessCommand();
// set the command parameters
changeBrightnessCommand.Brightness = imageBrightness;
// create an instance of the ImageViewerProcessingTool class
Vintasoft.Imaging.UI.VisualTools.ImageViewerProcessingTool imageViewerProcessingTool =
new Vintasoft.Imaging.UI.VisualTools.ImageViewerProcessingTool();
// specify that visual tool must use the command for processing visible area in image viewer
imageViewerProcessingTool.ProcessingCommand = changeBrightnessCommand;
// set the tool as the current tool of the ImageViewer
imageViewer.VisualTool = imageViewerProcessingTool;
}
Inheritance Hierarchy
System.Object
 Vintasoft.Imaging.UI.VisualTools.VisualTool
   Vintasoft.Imaging.UI.VisualTools.ImageViewerProcessingTool
Requirements
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
See Also