Factor Property (original) (raw)

Summary

Mathematical or logical operation factor.

Syntax

C#

Objective-C

C++/CLI

Java

Python

public int Factor { get; set; } 
@property (nonatomic, assign) NSInteger factor; 

public int getFactor(); public void setFactor( int intValue );

public: property int Factor { int get(); void set ( int ); }

Property Value

Mathematical or logical operation factor.

Example

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Color; public void ApplyMathematicalLogicCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\NaturalFruits.jpg")); // Prepare the command ApplyMathematicalLogicCommand command = new ApplyMathematicalLogicCommand(); command.Factor = 151; command.Flags = ApplyMathematicalLogicCommandFlags.OperationMultiply | ApplyMathematicalLogicCommandFlags.ValueDoNothing | ApplyMathematicalLogicCommandFlags.ResultDoNothing; // Multiply the colors of the bitmap using a factor of 1.51 . 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:\LEADTOOLS22\Resources\Images"; }