Examples Īssuming that the pixel color is expressed using straight (non-premultiplied) RGBA tuples, a pixel value of (0, 0.7, 0, 0.5) implies a pixel that has 70% of the maximum green intensity and 50% opacity. The same “limitations” of lower quantisation bit depths such as 8 bit per channel are also present in imagery without alpha, and this argument is problematic as a result. This loss of precision also makes premultiplied images easier to compress using certain compression schemes, as they do not record the color variations hidden inside transparent regions, and can allocate fewer bits to encode low-alpha areas. In practice, this is not usually noticeable because during typical composition operations, such as OVER, the influence of the low-precision color information in low-alpha areas on the final output image (after composition) is correspondingly reduced. This may cause a noticeable loss of quality if the color information is later brightened or if the alpha channel is removed. One disadvantage of premultiplied alpha is that it can reduce the available relative precision in the RGB values when using integer or fixed-point representation for the color components. Some rendering pipelines expose a "straight alpha" API surface, but converts them into premultiplied alpha for performance. The Porter–Duff operations have a simple form only in premultiplied alpha. if the image is used many times during later compositing). Īnother advantage of premultiplied alpha is performance in certain situations, it can reduce the number of multiplication operations (e.g. This is represented by an RGBA triplet that express emission with no occlusion, such as (0.4, 0.3, 0.2, 0.0). flame and glitter effects) to be encoded within the same image. smoke) and regions with additive blending mode (e.g. Premultiplied alpha may also be used to allow regions of regular alpha blending (e.g. Errors also occur in areas of semitransparency because the RGB components are not correctly weighted, giving incorrectly high weighting to the color of the more transparent (lower alpha) pixels. When interpolating or filtering images with abrupt borders between transparent and opaque regions, this can result in borders of colors that were not visible in the original image. Ordinary interpolation without premultiplied alpha leads to RGB information leaking out of fully transparent (A=0) regions, even though this RGB information is ideally invisible. The most significant advantage of premultiplied alpha is that it allows for correct blending, interpolation, and filtering. The use of the term alpha is explained by Smith as follows: "We called it that because of the classic linear interpolation formula α A + ( 1 − α ) B A 1984 paper by Thomas Porter and Tom Duff introduced premultiplied alpha using a geometrical approach. Wallace derived the same straight over operator based on a physical reflectance/ transmittance model in 1981. The concept of an alpha channel was introduced by Alvy Ray Smith and Ed Catmull in the late 1970s at the New York Institute of Technology Computer Graphics Lab. This matte layer contains the coverage information-the shape of the geometry being drawn-making it possible to distinguish between parts of the image where something was drawn and parts that are empty.Īlthough the most basic operation of combining two images is to put one over the other, there are many operations, or blend modes, that are used. In order to combine the picture elements of the images correctly, it is necessary to keep an associated matte for each element in addition to its color. Alpha blending is also used in 2D computer graphics to put rasterized foreground elements over a background. Compositing is used extensively in film when combining computer-rendered image elements with live footage. It is often useful to render picture elements (pixels) in separate passes or layers and then combine the resulting 2D images into a single, final image called the composite. In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. This color spectrum image's alpha channel falls off to zero at its base, where it is blended with the background color.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |