[CREATE] W3C Compositing and Blending 1.0 draft is up: implications for OpenRaster?

Andrew Chadwick a.t.chadwick at gmail.com
Mon Nov 12 07:50:56 PST 2012


On 09/11/12 23:32, Andrew Chadwick wrote:
>> I did a quick search looking for gamma/linear compositing in w3c 
>> but I couldn't find anything that suggests that other than sRGB is 
>> used. Was this issue ever discussed?
> 
> I've not been following the W3C discussions that closely. Sorry.

Correction to my statements upthread: I think the practical answer is:
blend in device space (!), or if you want to be more predictable, blend
in nonlinear sRGB.

FWIW, Photoshop seemingly does the blending non-linearly in indexed RGB
mode, looking at the examples at http://dunnbypaul.net/blends/ and
recreating them in MyPaint master HEAD=5d100ff5 (which uses nonlinear
sRGB space for blends). Results using the two sample images are
identical, modulo dithering.

Not sure what happens in Lab mode within Photoshop. It's supposedly
"different".


Better confirmatory information from one of the authors of the W3C spec:

; They are all going to blended in device color space just like in
; Flash, PDF, Illustrator and Photoshop. Looking at the underlying
; implementations in FireFox and WebKit, they are also not linearizing
; the colors.
; I have asked people on the Photoshop team about the color setting for
; gamma and they told me that that feature is almost never used (and
; even when it’s turned on it is sometimes ignored by the application
; on purpose).
;
; You are correct that the additional Photoshop blend modes are not
; part of the spec. Do you believe they should be? We’ve been focusing
; on the ones in the PDF spec since that is what the existing SVG spec
; was trying to implement.
;  -- Rik Cabanier, in a comment response at
https://blogs.adobe.com/webplatform/2012/04/04/bringing-blending-to-the-web/

I take from this that we should be ignoring the PDF specification in
regards to blending gamma. So I was wrong.

How does this sound: "For reasons of interoperability with a) Photoshop,
b) the web and c) the evolving SVG specifications, OpenRaster
implementations should apply blend modes in device space; ideally a
nonlinear space encoded from a linear representation of light intensity
using either the sRGB gamma curve, or a gamma of 2.2**(-1)."

And will any R, G and B do for the nonseparable modes? If you're being
pickily exact, perhaps it's best to use NTSC RGB primaries, but
presumably the sRGB primaries are close enough to the NTSC ones for the
blend functions to work acceptably on data in that space.


I'm not sure how things are supposed to be *composited* though. The
above quote doesn't answer that. I would still very much like this to be
linear :/ Perhaps you're still supposed to be explicit about compositing
space in SVG.


-- 
Andrew Chadwick


More information about the CREATE mailing list