Previous | Next --- Slide 27 of 63
Back to Lecture Thumbnails
OtB_BlueBerry

I see other operators on Wikipedia like atop and out. What are those for ?

motoole2

@OtB_BlueBerry There are a number of different ways to composite two triangles or two images together, though the over operator is perhaps the most commonly-used one. Porter and Duff wrote a paper titled Compositing Digital Images, which introduced the idea of pre-multiplied colors and other compositing operators including atop and out.

This webpage also has several interactive demos of compositing operators---give it a try! out can be used to punch out a Koala-shaped black hole in the image of NYC. That is, given an alpha mask A_a of the Koala and the image B of NYC, A over B produces an image B*(1-A_a). As for atop, try the link to get a sense as to what it does yourself.

Note that, OpenGL provides programmable control over how compositions function. There is a function called glBlendFunc that can be used to switch between over, out, atop, and other composition operators.