←Select platform

NewColor Property

Summary
Gets or sets the new color value used to replace the red color in the eyes.
Syntax
C#
C++/CLI
Python
public RasterColor NewColor { get; set; } 
public: 
property RasterColor NewColor { 
   RasterColor get(); 
   void set (    RasterColor ); 
} 
NewColor # get and set (RemoveRedEyeCommand) 

Property Value

The new color value used to replace the red color in the eyes.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Color; 
 
 
public void RemoveRedEyeCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "red_eye.cmp")); 
 
   // Prepare the command 
   RemoveRedEyeCommand command = new RemoveRedEyeCommand(); 
   //Apply the redeye removal command. 
   command.NewColor = new RasterColor(5, 20, 10); 
   command.Threshold = 125; 
   command.Lightness = 100; 
   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:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

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