2009.04.27 19:49 "[Tiff] Question regarding unassociated alpha", by Amir Ebrahimi

2009.04.28 22:12 "Re: [Tiff] Question regarding unassociated alpha", by Daniel McCoy

From Chris Cox <ccox@adobe.com>, Tue, Apr 28, 2009 at 01:37:42PM -0700:

Everyone seems to be using unassociated to mean that the alpha channel is not associated with the color data ­ ie: just extra information, not opacity.

" Unassociated alpha data is transparency information that logically exists independent of an image; it is commonly called a soft matte."

That implies that unassociated alpha is not opacity at all, or at best a selection/matte independent of the color data. That is how Photoshop and most other apps use the unassociated channels (though Photoshop will read and preserve up to 56 extra channels).

They should be marked "unspecified", not "unassociated". There should only be one "alpha" channel, and it should be either associated or unassociated.

"UNSPECIFIED" is for just data which can have any meaning.

"UNASSOCIATED" is indeed transparency, it just isn't premultiplied. The idea of unassociated being that one can modify the transparency channel without having to also modify the color information, and vice versa, you can modify the color without modifying the transparency, since the multiply will happen later.

"ASSOCIATED", the transparency has already been multiplied into the color, so you cannot independently modify the color and transparency, the premultiply has "associated" them with each other.

"Note that including both unassociated and associated alpha is undefined because associated alpha specifies that color components are pre-multiplied by the alpha component, while unassociated alpha specifies the opposite."

Then this tries to imply your version. A few video apps seem to treat unassociated channels this way (of course, the same apps screw up TIFF transparency in general, so that's not a good precendent).

Since these two sentences follow one another in the spec - I can see how folks might get confused.

The spec is not worded the way I would have wanted it, but that was what made it past the print-oriented people who made up the TIFF committee at the time.

It's a little tricky to explain, since the type of the alpha tag is telling you how to interpret the *COLOR* values, the alpha value is the same either way and should be interpreted the same. The only difference between unassociated and associated is the color values.

It should probably state something more like:

There should be at most one alpha channel which can be either associated or unassociated. There can be as many unspecified extra samples as desired.

That was the original intention.

Dan

On 4/27/09 2:14 PM, "Daniel McCoy" <mccoy@pixar.com> wrote:

From Chris Cox <ccox@adobe.com>, Mon, Apr 27, 2009 at 01:00:31PM -0700:

Unassociated alpha should never be premultiplied - it is not associated with the color channels. Only assoicated alpha should be premultiplied.

The statement "it is not associated with the color channels" seems like one that would be really easy to misinterpret.

It also seems important to make a distinction between "pre-multiply" and "multiply". For unassociate alpha, the color is always supposed to be eventually multiplied by the alpha channel, which stores opacity/coverage.

The tag is meant to indicate whether or not the sofware which wrote the image file has already done the multiplication or not.

(Background: Sam Leffler and I were the two who talked the tiff committee into adding this tag back in the previous century, so I am quite familiar with the original intent of the tag.)

EXTRASAMPLE_ASSOCALPHA - The sample is alpha representing coverage/opacity.

    The color has already been pre-multiplied by the value.
    The color value can be used directly in an over operation:

        Cnew = C + (1-AA) * Cbg

> > To display the image, one usuag