LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
Flags for the CombineCommand

Note:

Arithmetic calculations in this table assume 24-bit image data.

The following are the flags that define treatment of the source rectangle:

Value

Meaning

SourceNop

No change.

SourceNot

Invert the color, resulting in its complement.

Source0

Change all bits to 0.

Source1

Change all bits to 1.

The following are the flags that define treatment of the destination rectangle:

Value

Meaning

DestinationNop

No change.

DestinationNot

Invert the color, resulting in its complement.

Destination0

Change all bits to 0.

Destination1

Change all bits to 1.

The following are the flags that define the operation to use when combining the data:

Value

Meaning

OperationAnd

Combine each set of bytes using a bitwise AND (&).

OperationOr

Combine each set of bytes using a bitwise OR ( | ).

OperationXor

Combine each set of bytes using a bitwise exclusive OR (^).

OperationAdd

Add the byte values, allowing a maximum of 255.

OperationSubtractSource

Subtract the source from the destination, allowing a minimum of 0.

OperationSubtractDestination

Subtract the destination from the source, allowing a minimum of 0.

OperationMultiply

Multiply the byte values, allowing a maximum of 255. The result is calculated as follows: result = (source * dest) / 255.

OperationDivideSource

Divide the destination by the source. If source > 0, then the result is calculated as follows: result = min( (dest / source) * 255, 255 ). Otherwise, if source = 0, then result = 255.

OperationDivideDestination

Divide the source by the destination. If dest > 0, then the result is calculated as follows: result = min( (source / dest) * 255, 255 ). Otherwise, if dest = 0, then result = 255.

OperationAverage

Use the average of the two values.

OperationMinimum

Use the lesser of the two values.

OperationMaximum

Use the greater of the two values.

The following are the flags that define treatment of the resulting image rectangle:

Value

Meaning

ResultNop

No change.

ResultNot

Invert the color, resulting in its complement.

Result0

Change all bits to 0.

Result1

Change all bits to 1.