摘要 |
An alpha channel layer is generated by an opacity value that is assigned to each pixel of the image layer. The opacity value is represented by N bits/pixel and is generated by the expression j/(2N-1) where j is a value that represents the binary value of the N bits. When the image is to be rendered on the new background, the background layer is combined with the image and alpha channel layers to generate the updated, final RGB values for each pixel. These updated RGB components are expressed as Rfinal=R(p)*O+R(pbackground)*(1-O), Gfinal=G(p)*O+G(pbackground)*(1-O), and Bfinal=B(p)*O+B(pbackground)*(1-O) where O is the opacity value of image pixel p and pbackground is the background pixel associated with the image pixel p.
|