Alphablending
Alphablending, also known as alpha blending, is a digital image compositing technique used to combine a foreground image with a background using an alpha channel that encodes transparency. Each source pixel has a color Cs and an opacity α in [0,1]; the destination pixel has color Cd and possibly its own alpha Ad. The standard non-premultiplied blending equations are: C_out = α Cs + (1-α) Cd and A_out = α + (1-α) Ad. The resulting pixel is the blend of foreground and background according to α. In premultiplied alpha, color channels are already multiplied by α (C_s' = α Cs), and composition is typically C_out = C_s' + (1-α) C_d; A_out is computed similarly. Premultiplied alpha reduces color fringes at edges and simplifies compositing.
Alphablending is essential for transparency effects in many domains, including graphical user interfaces, 2D games, image
Implementation considerations include data representations (floating point vs integer), color space management, and sampling order when