←Select platform

Combine Property

Summary
Gets or sets a flag which tells how to color the output pixels.
Syntax
C#
Objective-C
C++/CLI
Python
public bool Combine { get; set; } 
@property (nonatomic, assign) BOOL combine; 
public: 
property bool Combine { 
   bool get(); 
   void set (    bool ); 
} 
Combine # get and set (SelectDataCommand) 

Property Value

A flag which tells how to color the output pixels:

  1. Pixels with values greater than or equal to the threshold value are set to Color (if Combine is set to false) or AND-ed with Color (if Combine is true). In this case, the source pixel is first converted to grayscale 24-bit and then AND-ed with Color.
  2. Pixels with values less than the threshold value are set to black (if Combine is set to false) or the RGB pixel value will be the same as the high byte source pixel value (if Combine is true). That is R = G = B = High byte values of the source pixel.
Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
 
public void SelectDataCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Beauty16.jpg")); 
 
   // Prepare the command 
   SelectDataCommand command = new SelectDataCommand(); 
   command.Color = new RasterColor(233, 10, 77); 
   command.Combine = true; 
   command.SourceLowBit = 2; 
   command.SourceHighBit = 6; 
   command.Threshold = 25; 
 
   command.Run(image); 
   codecs.Save(command.DestinationImage, Path.Combine(LEAD_VARS.ImagesDir, "SelectDataResult.Bmp"), RasterImageFormat.Bmp, 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.Core Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.