←Select platform

CombineCommandFlags Enumeration

Summary

Enumeration that indicates the treatment of the source, treatment of the destination, the operation to use when combining the data, and the treatment of the resulting image. The flags apply only to the defined rectangles (not necessarily the whole image). This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Syntax

C#
VB
Java
Objective-C
WinRT C#
C++
[FlagsAttribute()] 
public enum CombineCommandFlags   
<FlagsAttribute()> 
Public Enum CombineCommandFlags  
    
    
[FlagsAttribute()] 
public enum CombineCommandFlags    
typedef NS_OPTIONS(NSUInteger, LTCombineCommandFlags) 
public enum CombineCommandFlags 
Leadtools.ImageProcessing.Effects.CombineCommandFlags = function() { }; 
Leadtools.ImageProcessing.Effects.CombineCommandFlags.prototype = {<br/> 
  ResultMaster = 0x00000000, 
    SourceNop = 0x00000000, 
    SourceMaster = 0x00000000, 
    DestinationMaster = 0x00000000, 
    DestinationNop = 0x00000000, 
    OperationAnd = 0x00000000, 
    ResultNop = 0x00000000, 
    SourceNot = 0x00000001, 
    Source0 = 0x00000002, 
    Source1 = 0x00000003, 
    DestinationNot = 0x00000010, 
    Destination0 = 0x00000020, 
    Destination1 = 0x00000030, 
    OperationOr = 0x00000100, 
    SourceCopy = 0x00000120, 
    OperationXor = 0x00000200, 
    OperationAdd = 0x00000300, 
    OperationSubtractSource = 0x00000400, 
    OperationSubtractDestination = 0x00000500, 
    OperationMultiply = 0x00000600, 
    OperationDivideSource = 0x00000700, 
    OperationDivideDestination = 0x00000800, 
    OperationAverage = 0x00000900, 
    OperationMinimum = 0x00000A00, 
    OperationMaximum = 0x00000B00, 
    AbsoluteDifference = 0x00000C00, 
    ResultNot = 0x00001000, 
    Result0 = 0x00002000, 
    Result1 = 0x00003000, 
    SourceRed = 0x00010000, 
    SourceGreen = 0x00020000, 
    SourceBlue = 0x00030000, 
    DestinationRed = 0x00100000, 
    DestinationGreen = 0x00200000, 
    DestinationBlue = 0x00300000, 
    ResultRed = 0x01000000, 
    ResultGreen = 0x02000000, 
    ResultBlue = 0x03000000, 
    RawCombine = 0x04000000, 
     
 }; 
[FlagsAttribute()] 
public enum class CombineCommandFlags   

Members

ValueMemberDescription
0x00000000ResultMaster Perform the operation on all channels.

In order to speed up widely used image processing filters in LEADTOOLS, the grayscale value (master channel) of a colored image is calculated using the following formulas:

         #define CalcGrayValue(r, g, b) ((L_UCHAR)(((L_UCHAR) (((2 * (L_UINT) (r)) + (5 * (L_UINT) (g)) + (L_UINT) (b) + 4) / 8))))
         #define CalcGrayValue16(r, g, b) ((L_UINT16) (((2 * (L_UINT32) (r)) + (5 * (L_UINT32) (g)) + (L_UINT32) (b) + 4) / 8))
         #define CalcGrayValue32(r, g, b) ((L_UINT32) (((2 * (L_UINT32) (r)) + (5 * (L_UINT32) (g)) + (L_UINT32) (b) + 4) / 8))

0x00000000SourceNop No change.
0x00000000SourceMaster Perform the operation on all channels.
0x00000000DestinationMaster Perform the operation on all channels.
0x00000000DestinationNop No change.
0x00000000OperationAnd Combine each set of bytes using a bitwise AND.
0x00000000ResultNop No change.
0x00000001SourceNot Invert the color, resulting in its complement.
0x00000002Source0 Change all bits to 0.
0x00000003Source1 Change all bits to 1.
0x00000010DestinationNot Invert the color, resulting in its complement.
0x00000020Destination0 Change all bits to 0.
0x00000030Destination1 Change all bits to 1.
0x00000100OperationOr Combine each set of bytes using a bitwise OR.
0x00000120SourceCopy Copy source to destination.
0x00000200OperationXor Combine each set of bytes using a bitwise exclusive OR (^).
0x00000300OperationAdd Add the byte values, allowing a maximum of 255.
0x00000400OperationSubtractSource Subtract the source from the destination, allowing a minimum of 0.
0x00000500OperationSubtractDestination Subtract the destination from the source, allowing a minimum of 0.
0x00000600OperationMultiply Multiply the byte values, allowing a maximum of 255. The result is calculated as follows: result = (source * destination) / 255.
0x00000700OperationDivideSource Divide the destination by the source. If source > 0, then the result is calculated as follows: result = min( (destination / source) * 255, 255 ). Otherwise, if source = 0, then result = 255.
0x00000800OperationDivideDestination Divide the source by the destination. If dest > 0, then the result is calculated as follows: result = min( (source / destination) * 255, 255 ). Otherwise, if destination = 0, then result = 255.
0x00000900OperationAverage Use the average of the two values.
0x00000A00OperationMinimum Use the lesser of the two values.
0x00000B00OperationMaximum Use the greater of the two values.
0x00000C00AbsoluteDifference Calculate the Absolute difference between the two values.
0x00001000ResultNot Invert the color, resulting in its complement.
0x00002000Result0 Change all bits to 0.
0x00003000Result1 Change all bits to 1.
0x00010000SourceRed Perform the operation on the red channel.
0x00020000SourceGreen Perform the operation on the green channel.
0x00030000SourceBlue Perform the operation on the blue channel.
0x00100000DestinationRed Perform the operation on the red channel.
0x00200000DestinationGreen Perform the operation on the green channel.
0x00300000DestinationBlue Perform the operation on the blue channel.
0x01000000ResultRed Perform the operation on the red channel.
0x02000000ResultGreen Perform the operation on the green channel.
0x03000000ResultBlue Perform the operation on the blue channel.
0x04000000RawCombine Perform a raw combine.
Remarks

You can use a bitwise OR ( ¦ ) to specify one flag from each group.

Group Flags
Flags that define treatment of the source rectangle SourceNop, SourceNot, Source0, Source1
Flags that define treatment of the destination rectangle DestinationNop, DestinationNot, Destination0, Destination1
Flags that define the operation to use when combining the data OperationAnd, OperationOr, OperationXor, OperationAdd, OperationSubtractSource, OperationSubtractDestination, OperationMultiply, OperationDivideSource, OperationDivideDestination, OperationAverage, OperationMinimum, OperationMaximum, AbsoluteDifference
Flags that define treatment of the resulting image rectangle ResultNop, ResultNot, Result0, Result1
Flags that define the channel of the source image rectangle SourceMaster, SourceRed, SourceGreen, SourceBlue
Flags that define the channel of the destination image rectangle DestinationMaster, DestinationRed, DestinationGreen, DestinationBlue
Flags that define the channel of the resulting image rectangle ResultMaster, ResultRed, ResultGreen, ResultBlue

The flags will work with the following order: First the operations on source and destination rectangles will take effect then the combining operation will be implemented, then the operation on result rectangle will take effect. For more information, refer to Flags for the CombineCommand.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Effects Assembly