RE: [Moderator Action (size limit exceeded)] RE: SVG masks and luminance calculations

Hi Erik,

Illustrator is turning these masks into opacity masks.
In the PDF/AIM world this corresponds to a luminosity blend mode. All the colorspaces (=document + blend + object) are the same so the calculations are done on the original RGB values.
I *think* this corresponds to linearRGB in the SVG world. I have to admit that the way SVG does color management is a little foreign to me since it's not ICC based... 

So, from the PDF spec:
Luminosity: 
 Creates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.
 B(Cb,Cs) = SetLum(Cb, Lum(Cs))

Cs = the boxes going from black to white + the image
Cb = the red box

Lum(Cs) = .3 *Cred + 0.59 * Cgreen + 0.11*Cblue
Here: Lum(Cs) = the gray value

So, the 'gray' value of the mask should be applied to the hue and saturation of the red box.

> -----Original Message-----
> From: Erik Dahlstrom [mailto:ed@opera.com]
> Sent: Monday, February 07, 2011 5:44 AM
> To: Chris Lilley; Rik Cabanier
> Cc: Boris Zbarsky; Tavmjong Bah; Dirk Schulze; www-svg@w3.org; Robert
> Longson
> Subject: Re: [Moderator Action (size limit exceeded)] RE: SVG masks and
> luminance calculations
> 
> Forwarding yet another message on behalf of Jos Hirth:
> 
> Adobe Illustrator CS3 also does it the sRGB way. (It's kinda unlikely that they
> touched that code with CS4 or CS5.)
> Screenshot: http://i.imgur.com/v1FWt.png

> 
> Rik, can you confirm? This was testing with http://kaioa.com/svg/mask-

> test.svgz.
> 
> Cheers
> /Erik
> 
> On Sun, 06 Feb 2011 22:02:53 +0100, Rik Cabanier <cabanier@adobe.com>
> wrote:
> 
> > Alternatively, you can find the complete spec here:
> >
> http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/pdf_refer

> enc
> > e_1-7.pdf Page 523 has the formula for luminance..
> >
> >> -----Original Message-----
> >> From: Chris Lilley [mailto:chris@w3.org]
> >> Sent: Saturday, February 05, 2011 2:59 AM
> >> To: Rik Cabanier
> >> Cc: Erik Dahlstrom; Boris Zbarsky; Tavmjong Bah; Dirk Schulze; www-
> >> svg@w3.org; Robert Longson
> >> Subject: Re: [Moderator Action (size limit exceeded)] RE: SVG masks
> >> and luminance calculations
> >>
> >> On Friday, February 4, 2011, 6:46:01 PM, Rik wrote:
> >>
> >> RC> Assuming you're talking about luminosity masks, the formula for
> >> RC> calculating them is defined in the PDF spec.
> >> RC> I've attached the relevant pages to this mail. (Page 523 has the
> >> RC> actual math.)
> >>
> >> The original email was rejected because the attachment was too large.
> >>
> >> The original attachment can be found at
> >> http://lists.w3.org/Archives/Public/www-archive/2011Feb/att-

> >> 0009/Pages_from_pdf_reference_1-7.pdf
> >>
> >>
> >> --
> >>  Chris Lilley   Technical Director, Interaction Domain
> >>  W3C Graphics Activity Lead, Fonts Activity Lead  Co-Chair, W3C
> >> Hypertext CG  Member, CSS, WebFonts, SVG Working Groups
> >
> 
> 
> --
> Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C
> SVG Working Group Personal blog: http://my.opera.com/macdev_ed

Received on Monday, 7 February 2011 20:10:07 UTC