public class ChangeContrastCommand : RasterCommand Public Class ChangeContrastCommandInherits RasterCommand
@interface LTChangeContrastCommand : LTRasterCommand public class ChangeContrastCommand extends RasterCommand public ref class ChangeContrastCommand : public RasterCommand If the image has a LUT and you want to work on the image data, set RasterImage.UseLookupTable to false. Then, after calling the method, reset the UselookupTable property to true, as follows:
rasterImage.UseLookupTable = false;Method(rasterImage);rasterImage.UseLookupTable = true;
For more information, refer to Changing Brightness and Contrast.
Runs the ChangeContrastCommand on an image and increases its contrast.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing.Color;public void ChangeContrastCommandExample(){// Load an imageRasterCodecs codecs = new RasterCodecs();codecs.ThrowExceptionsOnInvalidImages = true;RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\Image1.jpg"));// Prepare the commandChangeContrastCommand command = new ChangeContrastCommand();//Increase the contrast by 25 percent of the possible range.command.Contrast = 250;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 LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessing.ColorPublic Sub ChangeContrastCommandExample()Dim codecs As New RasterCodecs()codecs.ThrowExceptionsOnInvalidImages = TrueDim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\Image1.jpg"))' Prepare the commandDim command As ChangeContrastCommand = New ChangeContrastCommand'Increase the contrast by 25 percent of the possible range.command.Contrast = 250command.Run(leadImage)codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24)End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\LEADTOOLS21\Resources\Images"End Class
Leadtools.ImageProcessing.Color Namespace
Changing Brightness and Contrast
HistogramContrastCommand Class
HistogramEqualizeCommand Class
Leadtools.ImageProcessing.FillCommand
Leadtools.ImageProcessing.Core.WindowLevelCommand
Leadtools.ImageProcessing.Effects.DeinterlaceCommand
Leadtools.ImageProcessing.Effects.SmoothEdgesCommand
LocalHistogramEqualizeCommand Class
Leadtools.ImageProcessing.Core.CorrelationListCommand
GrayScaleToDuotoneCommand Class
GrayScaleToMultitoneCommand Class
Leadtools.ImageProcessing.Core.HolePunchRemoveCommand
Leadtools.ImageProcessing.Effects.SkeletonCommand
ChangeHueSaturationIntensityCommand Class
MathematicalFunctionCommand Class
ApplyMathematicalLogicCommand Class
ColorIntensityBalanceCommand Class
Leadtools.ImageProcessing.Core.ColorizeGrayCommand
ContrastBrightnessIntensityCommand Class
Leadtools.ImageProcessing.Core.DigitalSubtractCommand
Leadtools.ImageProcessing.SpecialEffects.FunctionalLightCommand
Leadtools.ImageProcessing.Core.MultiscaleEnhancementCommand
Leadtools.ImageProcessing.Core.SelectDataCommand
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
