- <!--// Moderator's note: This topic was split off from “Transparency”. //-->
Wikipedia ([url=http://en.wikipedia.org/wiki/Alpha_compositing#Description]Alpha compositing[/url]) wrote:If an alpha channel is used in an image, it is common to also multiply the color by the alpha value, to save on additional multiplications during compositing. This is usually referred to as premultiplied alpha.
Wikipedia ([url=http://en.wikipedia.org/wiki/Portable_Network_Graphics#Transparency_of_image]Portable Network Graphics[/url]) wrote:Alpha storage can be "associated" ("premultiplied") or "unassociated", but PNG standardized on "unassociated" ("non-premultiplied") alpha so that images with separate transparency masks can be stored losslessly.
W3C (PNG Specification v1.0 » [url=http://www.w3.org/TR/PNG-Rationale.html#R.Non-premultiplied-alpha]Non-premultiplied alpha[/url]) wrote:PNG uses "unassociated" or "non-premultiplied" alpha so that images with separate transparency masks can be stored losslessly. Another common technique, "premultiplied alpha", stores pixel values premultiplied by the alpha fraction; in effect, the image is already composited against a black background. Any image data hidden by the transparency mask is irretrievably lost by that method, since multiplying by a zero alpha value always produces zero.
Some image rendering techniques generate images with premultiplied alpha (the alpha value actually represents how much of the pixel is covered by the image). This representation can be converted to PNG by dividing the sample values by alpha, except where alpha is zero. The result will look good if displayed by a viewer that handles alpha properly, but will not look very good if the viewer ignores the alpha channel.
Although each form of alpha storage has its advantages, we did not want to require all PNG viewers to handle both forms. We standardized on non-premultiplied alpha as being the lossless and more general case.
mtPaint Handbook (Channels » [url=http://mtpaint.sourceforge.net/handbook/en_GB/chap_07.html#SEC12]Unassociate Alpha[/url]) wrote:RGB images with alpha transparency can be stored in two different ways. One way is to store raw RGB values and alpha values as separate and independent channels; this is called "unassociated alpha". Another way is to store RGB values not raw, but premultiplied by corresponding alpha value, which is then called "associated alpha". mtPaint, like most other image processing programs, stores images with unassociated alpha, to be able to manipulate RGB and alpha independently of one another, and not lose RGB data when zeroing out alpha. On the other hand, rendering software prefers associated alpha, because with RGB values already multiplied by alpha, less work remains to be done in real time when doing alpha blending. Some image formats, such as TIFF and TGA, support both types of alpha, but are frequently mislabelled; other formats such as PNG <!--// ?¿? //--> or BMP support just one type of alpha, and usually don't define which - in practice it means that it can be both types equally likely. mtPaint automatically converts images with definitely recognized associated alpha to unassociated - but type of alpha cannot be autodetected reliably, and when autodetection fails, "Unassociate Alpha" allows one to convert a misdetected image with associated alpha to unassociated.
- Yves Poissant: Alpha channel fundamentals
- Justin Sirois: How to use an Alpha channel » Premultiplied & Straight Alphas
- DVD-HQ: Alpha matting & premultiplication =
= Animation Artist: Alpha Matting and Premultiplication - Lawrence Kesteloot: Alpha Premultiplication
- Damon Ledet: Premultiplied Alpha vs Straight Alpha
- Hjælp mig nu: What is premultiplied alpha blending
- Distant Souls: Premultiplied Alpha — Online Interactive demo
- Ed Schiffer: Premultiplied vs Straight
- eppz!: Understanding premultiplied alpha
- Timm Dapper: Alpha Blending for Leaves
- Robin Wood: Eliminating "White Halos" in Second Life — Part #1 + #2
- Creative COW: Photoshop for Video — Straight Alpha Channels
- Nvidia Developer Zone: Alpha Blending — To Pre or Not To Pre
- vbAccelerator: Alpha Image Creator
- XnView Forum
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?t=13031&p=50837#p50837]Free Adobe Photoshop Plug-Ins[/url]) wrote:
- Solidify A / Solidify B / Solidify C
Solidify turns an image layer entirely 100% opaque. It reveals partially transparent areas, and can even help repair the corrupted transparency channel that some paint programs occasionally produce. It's also good for quickly filling in missing regions of a panorama.
Solidify A softly blurs the solid part into the transparent region. Solidify B smears only the outer edge for a harder look. Solidify C gives the smoothest, most uniform result.