02-22-2005, 12:29 PM
Basically, the colour can be stored in two different ways in an image with an alpha channel.
Straight, or pre-multiplied.
Straight is easy. Basically, the RGB is left as it is, and the transparency is stored in the alpha channel.
Pre-multiplied means that the RGB is actually (mathematically) multiplied by the value of the alpha channel.
This basically makes it easier to layer during compositing, less calculations.
final_rgb = (background_rgb * (1.0 - alpha)) + (foreground_rgb * alpha)
final_rgb = (background_rgb * (1.0 - alpha)) + foreground_rgb
There are a couple more issues, you can pre-multiply to different background colours, in the example above I assum a pre-multiply to black (which is imho the most common).
02-22-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.