Flags for the CombineCommand

Note:

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

The following flags define how to treat 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 flags define how to treat 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 flags define which 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 flags define how to treat 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.

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

LEADTOOLS Imaging, Medical, and Document
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.