Alpha channel

from Wikipedia, the free encyclopedia

The alpha channel or α-channel is a term used in computer graphics . A digital image usually contains color information. If the image file contains an alpha channel, additional information about transparency can be found there . The alpha channel is an additional channel that stores the transparency of the individual pixels in raster graphics . The representation of an image with an alpha channel on a background is known as alpha blending . A typical application is an outdoor scene in which the foreground elements have an alpha channel and therefore the background can be completely replaced with the sky without the manipulation being noticed.

history

So-called mattes were already in use in film technology decades before the invention of the computer - strips of film that represented individual objects and that could be placed over a background ( compositing ). With the advent of digital film techniques, digital mattes were also developed.

The term integral alpha was introduced in 1977 by Alvy Ray Smith and Edwin Catmull for the idea that transparency information should not be stored in a separate digital mat, but with the pixels to simplify the process. This additional image channel was "alpha channel" ( alpha channel ), the corresponding pixels "RGBA" pixels called. The term "Alpha" refers to the variable in the classic formula for linear interpolation

,

as used in alpha blending . The introduction of the alpha channel made digital mattes superfluous. In 1984 Thomas Porter and Tom Duff developed refined alpha blending techniques (see also Porter-Duff Composition ).

Catmull, Porter, Duff, and Smith received an Engineering Award from the Academy of Motion Picture Arts and Sciences in 1996 for their services in developing digital compositing techniques .

Storage and presentation

An image with an alpha channel, here on a white background
The same picture on a different background
Representation of the direct alpha channel stored in the image file. Lighter areas are more opaque, darker areas are more transparent.

In the alpha channel, transparency information is stored in addition to the actual image data for various graphic formats (e.g. PNG , PSD , TGA , DDS or TIFF ). An alpha channel usually has the same color depth as a color channel in an image. For example, an alpha channel in an 8-bit image comprises 256 levels. The value alpha = 0 corresponds to the attribute "completely transparent", i. H. invisible. Alpha = 255 corresponds to "not transparent".

The maximum number of possible degrees of transparency depends on the number of bits used for the alpha channel . A binary alpha channel is a minimal alpha channel that uses 1 bit and can therefore only indicate whether a pixel is either completely transparent or completely opaque . As a result, comparable to the use of a binary alpha channel, a color of an image can also be defined as transparent. This type of transparency is used in the Graphics Interchange Format (GIF), which means that one shade less can be used for representation. However, it is not an alpha channel in the technical sense, since the transparency information is not saved individually for each pixel. Other formats often allow an additional byte per pixel and thus 2 8 = 256 gradations. In contrast to the GIF, an 8- or 16-bit alpha channel can be used in the PNG file format. This “real” alpha channel is also called graphics with four channels, which are often abbreviated as RGBA (red, green, blue, alpha).

Types of alpha channels

Alpha channels can be saved in three different ways:

External or separate alpha channel
When saved as an external alpha channel , the transparency information is saved as a separate file. This is a grayscale file that must be interpreted as a transparency channel when opened. To display an image with an external alpha channel, both the image file and the alpha channel file must be imported, and the correct transparency of the file is established using the displaying application. This process is also known as the interpretation of the alpha channel .
Direct alpha channel
In the case of files that contain the alpha channel as a so-called direct alpha channel (straight alpha) , the transparency information is stored in a separate channel in addition to the color channels. A pixel within the file is therefore not only saved with three values ​​(R, G, B), but with four values: (R, G, B, α). For example, a dark blue pixel that should be displayed with full opacity would be saved with a color depth of 8 bits by the values ​​(0, 0, 170, 255). The color channel information of the image is not changed by the direct alpha channel.
Integrated alpha channel
With the integrated alpha channel (premultiplied alpha) , the transparency information is stored in a separate channel, as with the direct alpha channel. The main difference to the direct alpha channel is that the color values ​​of the image are mixed with a background color in relation to the alpha channel. How much of a pixel's original color is used depends on its opacity. For example, semi-transparent pixels are saved with 50% black and 50% background color. This integration of the alpha channel into the color channels does not take place instead of, but in addition to, the storage of the alpha channel. This is to enable the correct display of the image even in applications that do not support an alpha channel.

Other uses

Alpha channels can be defined in various image processing programs . Selections in the image can also be saved for later reuse. In Photoshop , temporary alpha channels are formed when a layer is masked. Alpha channels can also be used to crop an image. This is often done by copying an existing color channel to an alpha channel and then quickly editing it using the image editing functions (curves, contrasts, brushes, etc.).

With the GIMP , the alpha channel can also be used for cropping (on other layers or in other images) using the "Select from alpha channel" function in the context menu.

An alpha channel can also be used for video to separate objects from the background. The alpha channel can be saved directly with the video or in a separate video file.

literature

  • Thomas Porter, Tom Duff: Compositing Digital Images. In SIGGRAPH 1984 Proceedings. Pp. 253-259. ACM, New York 1984, ISBN 0-89791-138-5 ( PDF, 730 kB )
  • Alvy Ray Smith: Alpha and the History of Digital Compositing. Technical Memo 7, 1995 ( PDF, 40 kB ( Memento from March 11, 2015 in the Internet Archive ))
  • Alvy Ray Smith: Digital Paint Systems: An Anecdotal and Historical Overview. IEEE Annals of the History of Computing 23, 2 (Apr-Jun 2001): 4-30, ISSN  1058-6180

Individual evidence

  1. ^ Alvy Ray Smith: Digital Paint Systems: An Anecdotal and Historical Overview, p. 6
  2. ^ Alvy Ray Smith: Alpha and the History of Digital Compositing, p. 5
  3. ^ Alvy Ray Smith: Digital Paint Systems: An Anecdotal and Historical Overview, p. 27