←Select platform

BrightnessFactor Property

Summary
Gets or sets the brightness factor for increasing or decreasing the brightness of the image.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int BrightnessFactor { get; set; } 
@property (nonatomic, assign) NSUInteger brightnessFactor; 
public int getBrightnessFactor(); 
public void setBrightnessFactor( 
   int intValue 
); 
public: 
property int BrightnessFactor { 
   int get(); 
   void set (    int ); 
} 
BrightnessFactor # get and set (SubtractBackgroundCommand) 

Property Value

Brightness factor for increasing or decreasing the brightness of the image. Valid values range from 0 - 400. If you pass 100 the brightness remains unchanged. Lower values darken the image while higher values lighten the image.

Example
C#
using Leadtools; 
using Leadtools.ImageProcessing; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void SubtractBackgroundCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Image4.Tif")); 
 
   // Prepare the command 
   SubtractBackgroundCommand command = new SubtractBackgroundCommand(); 
   command.RollingBall = 50; 
   command.BrightnessFactor = 100; 
   command.ShrinkingSize = SubtractBackgroundCommandType.DependOnRollingBallSize; 
   command.Flags = SubtractBackgroundCommandFlags.BackgroundIsDarker; 
   //Apply Subtract Background effect on the image. 
   command.Run(image); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.ImageProcessing.Core Assembly

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