←Select platform

Type Property

Summary
Gets or sets the adjustment method.
Syntax
C#
VB
Objective-C
C++
Java
public AdaptiveContrastCommandType Type { get; set; } 
Public Property Type As AdaptiveContrastCommandType 
@property (nonatomic, assign) LTAdaptiveContrastCommandType type 
public AdaptiveContrastCommandType getType() 
public void setType(AdaptiveContrastCommandType value) 

Property Value

The adjustment method to use.

Example

Run the AdaptiveContrastCommand on an image.

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
 
public void TypePropertyExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp")); 
 
   // Prepare the command 
   AdaptiveContrastCommand command = new AdaptiveContrastCommand(); 
   command.Amount = 200; 
   command.Dimension = 9; 
   command.Type = AdaptiveContrastCommandType.Linear; 
   //Apply Adaptive Contrast Enhancement. 
   command.Run(image); 
   codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS21\Resources\Images"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing.Color 
 
Public Sub TypePropertyExample() 
   Dim codecs As New RasterCodecs() 
   codecs.ThrowExceptionsOnInvalidImages = True 
 
   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample1.cmp")) 
 
   ' Prepare the command 
   Dim command As AdaptiveContrastCommand = New AdaptiveContrastCommand 
   command.Amount = 200 
   command.Dimension = 9 
   command.Type = AdaptiveContrastCommandType.Linear 
   ' Apply Adaptive Contrast Enhancement. 
   command.Run(leadImage) 
   codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24) 
 
End Sub 
 
Public NotInheritable Class LEAD_VARS 
   Public Const ImagesDir As String = "C:\LEADTOOLS21\Resources\Images" 
End Class 
Requirements

Target Platforms

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Color Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.