… for Codecs & Media
Tip #1238: An Overview of Alpha Channels
Alpha channels are the magic that make compositing and most effects possible.
The process of adding an alpha channel to an image – as a developer – is highly complex. Fortunately, we don’t need to understand how the channel is added to take advantage of it.
Just as the red, blue and green channels describe the amount of red, blue or green in each pixel, the alpha channel describes the amount of transparency in each pixel. An alpha channel provides a way to store images and their transparency information in a single file without disturbing the color channels.
Many file formats can include an alpha channel, including Adobe Photoshop, ElectricImage, TGA, TIFF, EPS, PDF, and Adobe Illustrator. ProRes, AVI and QuickTime (saved at a bit depth of Millions Of Colors+), also can contain alpha channels, depending upon the codecs used to generate these file types.
Alpha channels store transparency information in files in one of two ways: straight or premultiplied. Although the alpha channels are the same, the color channels differ.
With straight (or unmatted) channels, transparency information is stored only in the alpha channel, not in any of the visible color channels. With straight channels, the effects of transparency aren’t visible until the image is displayed in an application that supports straight channels.
With premultiplied (or matted) channels, transparency information is stored in the alpha channel and also in the visible RGB channels, which are multiplied with a background color. The colors of semitransparent areas, such as feathered edges, are shifted toward the background color in proportion to their degree of transparency.
Some software lets you specify the background color with which the channels are premultiplied; otherwise, the background color is usually black or white.
Straight channels retain more accurate color information than premultiplied channels. While premultiplied channels are compatible with a wider range of programs, such as Apple QuickTime Player.
Often, the choice of whether to use images with straight or premultiplied channels has been made before you receive the assets to edit and composite. Premiere Pro and After Effects recognize both straight and premultiplied channels, but only the first alpha channel they encounter in a file containing multiple alpha channels.
Use ProRes 4444 when you need to create or transfer clips with alpha channels.
Alpha channels are supported in all NLEs, and there are dozens of articles on the web detailing how to work with them to create a variety of different effects.