PCL
|
Image composition operators. More...
The following are the Porter-Duff alpha composition operators, supported by all versions of PixInsight:
CompositionOp::Clear | Clear |
CompositionOp::Source | A |
CompositionOp::Destination | B |
CompositionOp::SourceOver | A over B |
CompositionOp::DestinationOver | B over A |
CompositionOp::SourceIn | A in B |
CompositionOp::DestinationIn | B in A |
CompositionOp::SourceOut | A out B |
CompositionOp::DestinationOut | B out A |
CompositionOp::SourceAtop | A atop B |
CompositionOp::DestinationAtop | B atop A |
CompositionOp::Xor | A xor B |
See T. Porter & T. Duff, Compositing Digital Images, Computer Graphics Vol. 18, Num. 3, July 1984, pp 253-259.
In addition, the following operators are also supported starting from PixInsight core version 1.7.0.702:
CompositionOp::Min | Min( A, B ) |
CompositionOp::Max | Max( A, B ) |
CompositionOp::Add | A + B |
CompositionOp::Multiply | A * B |
CompositionOp::Screen | ~A * ~B |
CompositionOp::Overlay | (A > 0.5) ? ~(~(2*(A - 0.5)) * ~B) : 2*A*B |
CompositionOp::ColorDodge | A/~B |
CompositionOp::ColorBurn | ~(~A/B) |
CompositionOp::HardLight | (B > 0.5) ? ~(~A * ~(2*(B - 0.5))) : A*2*B |
CompositionOp::SoftLight | (B > 0.5) ? ~(~A * ~(B - 0.5)) : A*(B + 0.5) |
CompositionOp::Difference | Abs( A - B ) |
CompositionOp::Exclusion | 0.5 - 2*(A - 0.5)*(B - 0.5) |
In the tables above, A represents a target pixel and B represents a source pixel. For example, if a Graphics object is being used to paint on a Bitmap object, bitmap pixels are target pixels, and any graphical elements drawn using the Graphics object are considered as source pixels.