Premultiplied alpha
A way of storing transparency in which each pixel's colour has already been multiplied by its alpha. The alternative, straight alpha, keeps colour and alpha separate. Reading a file as the wrong one gives dark or bright fringes at the edges.
Also called associated alpha, matted alpha, straight alpha.
In After Effects
In After Effects you set this per file under File ▸ Interpret Footage ▸ Main, in the Alpha section: Straight - Unmatted or Premultiplied - Matted With Color, with a Guess button. On export, the Output Module's Channels (RGB + Alpha) and Color (Straight or Premultiplied) settings decide what is written.
In Premation
A file's alpha mode is read once, at decode, under Interpret Footage ▸ Alpha on the asset. Past that point everything in the engine is premultiplied.
Step by step
- 01Import the file and select it in the Assets panel.
- 02Open Interpret Footage from the Assets panel toolbar.
- 03Set Alpha to Straight or Premultiplied to match how the file was made. The setting lives on the asset, so every layer that uses it follows.
- 04Check a soft edge over a light and a dark background. A dark or bright fringe means the setting still does not match the file.
Tips
- A dark halo on soft edges usually means a premultiplied file is being read as straight, so the colour is multiplied by alpha a second time. A bright fringe is the opposite mistake.
- Blurs and scaling should run on premultiplied values. Filtering straight colour drags edge pixels toward whatever colour the transparent pixels happen to store.
- When you hand someone a transparent file, tell them which alpha it carries. Most fringe problems come from the receiving app guessing.
Questions
- What is the difference between straight and premultiplied alpha?
- Straight alpha keeps a pixel's full colour and its transparency separate. Premultiplied alpha stores the colour already multiplied by the transparency, so a half-transparent red pixel is stored as half-brightness red.
- Why does my transparent image have a black or white outline?
- The file is being interpreted with the wrong alpha mode. Switch it between Straight and Premultiplied in Interpret Footage and the fringe should disappear.
- How does Premation handle premultiplied alpha?
- A file's alpha mode is read once, at decode, from Interpret Footage ▸ Alpha. Past that point every colour in the engine is premultiplied, so there is one alpha space throughout the render.