Re: luminanceToAlpha values in FEColorMatrix

On Fri, Sep 2, 2011 at 10:44 AM, Dean Jackson <dino@apple.com> wrote:

> Hi Rik,
>
> On 02/09/2011, at 2:53 PM, Rik Cabanier wrote:
>
> PDF (and all Adobe apps that create luminosity masks) use 0.03 Red, 0.59
> Green, 0.11 Blue which is close to ITU-R BT.601
>
> Where did you get the values for Flash?
>
>
> Good catch! It turns out that I thought I was reading the Flash docs, but I
> was instead reading the docs for a Flash library. My mistake.
>
> Also, while admitting that error, I found another since sending that email.
> The OpenGL values come from informative notes on the OpenGL site - not an
> official value.
>
> Flash content generated from our applications (such as InDesign and
> Acrobat.com) also use these values.
> I can ask internally where these numbers came from.
>
>
> Maybe the question to ask is if the BT.709 values are acceptable? Given
> that they've been in the spec for a long time (although with a minor
> difference/error) I think we'd need a good reason to change them
> dramatically. I wonder what the Adobe SVG Viewer used - the Adobe values or
> the SVG values?
>

Sorry, it took me a while to find the sources of the Adobe SVG viewer.
It uses the same values as PDF to calculate luminosity so 0.3 Red, 0.59
Green, 0.11 Blue

Rik


>
> Dean
>
>
>
> On Thu, Sep 1, 2011 at 6:10 PM, Dean Jackson <dino@apple.com> wrote:
>
>> Get your acronym hats on.
>>
>> A colleague has questioned the values used for luminanceToAlpha in
>> FEColorMatrix. The specification (since SVG 1.0) has used:
>>
>>  0.2125 red, 0.7154 green, 0.0721 blue
>>
>> But where do these numbers come from? It turns out there are a few
>> different specifications for this. The closest to what is specified is in
>> Rec. ITU-R BT.709-5 [1], but it is slightly different:
>>
>>  0.2126 red, 0.7152 green, 0.0722 blue
>>
>> Yes, a minor difference, but it would be nice to reference an external
>> specification. sRGB is based on Rec 709, so I guess this might be the
>> definitive source. According to [2], sRGB uses the latter values.
>>
>> Even then, I'm told that it is more common to use other luminance to alpha
>> values. For example, ITU-R BT.601 (YIQ? NTSC? JPEG?) [3] uses:
>>
>>  0.299 red, 0.587 green, 0.114 blue
>>
>> And Flash + OpenGL use:
>>
>>  0.3086 red, 0.6094 green, 0.0820 blue
>>
>> Since sRGB is used throughout the SVG specification, and sRGB takes its
>> values from Rec 709, and Rec 709 seems modern (it's designed for HDTV), and
>> the values are really close to what is already specified, I suggest we
>> formally link to Rec 709 and use its values (a very slight change to current
>> implementations).
>>
>> Note that these values are also used in other parts of FEColorMatrix, as
>> well as other parts of the SVG specification (although it seems the spec
>> doesn't always reference explicitly). For example:
>>
>> - FEColorMatrix type="saturate" and type="huerotate"
>> - 'mask' property
>>
>> Dean
>>
>> [1]
>> http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.709-5-200204-I!!PDF-E.pdf
>> [2] http://en.wikipedia.org/wiki/SRGB
>> [3] http://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.601_conversion
>>
>>
>
>

Received on Wednesday, 14 September 2011 01:18:44 UTC