|
|
XOR mode
| |
Description:
Base and blend color are combined with a logical (binary) XOR.
The result looks very strange if used on normal images (like photos).
Like difference, exclusion and negation this mode can be used to invert parts of the base image,
and to compare two images (results in black if they are equal).
Since this is a binary formula, it cannot be described with floating point values.
Advantages:
This mode is commutative (base and blend color can be swapped).
It is the only mode (of the ones mentioned on this site), that can be undone by applying it twice.
Disadvantage:
Discontinuances all around (except for a = 0 or b = 0).
Code:
|
|
|
AND / OR mode
| |
Description:
Base and blend color are combined with a logical (binary) AND / OR.
The result looks very strange if used on normal images (like photos) and is used rarely.
While XOR mode can be compared to exclusion, a logical AND mode could be compared to multiply, and a logical OR could be compared to screen mode.
Since these are binary formulas, they cannot be described with floating point values.
Disadvantage:
Discontinuances all around (except for a = 0 or b = 0).
Code (AND):
Code (OR):
|
|
|
|
|
|
|