Transparency
Using the methods described in the earlier sections, we can construct overlapped collages of images, changing their size, orientation, and color. Until now, such collages were made of images, which look like colored rectangles. But we often want to have collages made of non-rectangular images, as shown in the following screenshot:
In the preceding screenshot, the collage is made of a number of sunflower images, having not a rectangular but quite a difficult curvilinear shape. Modeling such shapes directly is a difficult and memory-consuming task. A more elegant solution, used in raster graphics, is using the alpha channel. In this technique, we still use rectangular images but consider the pixels as having not only color components but also an additional alpha component that controls the pixel's opacity. The minimum alpha value (0) means that the pixel is absolutely transparent; that is, invisible to the user. And the maximum alpha value (255) means that the pixel is opaque....