Flags for the CombineExt Method

Flags for the CombineExt method

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

CB_SRC_NOP

No change.

CB_SRC_NOT

Invert the color, resulting in its complement.

CB_SRC_0

Change all bits to 0.

CB_SRC_1

Change all bits to 1.

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

Value

Meaning

CB_DST_NOP

No change.

CB_DST_NOT

Invert the color, resulting in its complement.

CB_DST_0

Change all bits to 0.

CB_DST_1

Change all bits to 1.

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

Value

Meaning

CB_OP_AND

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

CB_OP_OR

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

CB_OP_XOR

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

CB_OP_ADD

Add the byte values, allowing a maximum of 255.

CB_OP_SUBSRC

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

CB_OP_SUBDST

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

CB_OP_MUL

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

CB_OP_DIVSRC

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.

CB_OP_DIVDST

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.

CB_OP_AVG

Use the average of the two values.

CB_OP_MIN

Use the lesser of the two values.

CB_OP_MAX

Use the greater of the two values.

CB_OP_ABSDIF

Calculate the absolute difference between the two values.

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

Value

Meaning

CB_RES_NOP

No change.

CB_RES_NOT

Invert the color, resulting in its complement.

CB_RES_0

Change all bits to 0.

CB_RES_1

Change all bits to 1.

The following are the flags that define the channel of the source image rectangle:

Value

Meaning

CB_SRC_MASTER

perform operation on all Channels.

CB_SRC_RED

perform operation on Red Channel.

CB_SRC_GREEN

perform operation on Green Channel.

CB_SRC_BLUE

perform operation on Blue Channel.

The following are the flags that define the channel of the destination image rectangle:

Value

Meaning

CB_DST_MASTER

perform operation on all Channels.

CB_DST_RED

perform operation on Red Channel.

CB_DST_GREEN

perform operation on Green Channel.

CB_DST_BLUE

perform operation on Blue Channel.

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

Value

Meaning

CB_RES_MASTER

perform operation on all Channels.

CB_RES_RED

perform operation on Red Channel.

CB_RES_GREEN

perform operation on Green Channel.

CB_RES_BLUE

perform operation on Blue Channel.