Hi Nikos,
I shortened a bit, please see below.
On 01/21/2015 01:11 AM, Nikos Andronikos wrote:
My understanding is that the PNG spec only says 'should'. Therefore PNG
only recommends alpha compositing in a linear space, but this is not
strictly required, and browsers ignore it and do all PNG composing in sRGB.
A test: http://jsfiddle.net/dodgeyhack/ffzjtrwz/1/
Nice test! And yes it only says 'should' but it goes into great detail
how to do so in an effort to improve the state of affairs.
I know it's really hard to find correct implementations of color
algorithms, but one cannot expect that to improve if something exposed
like W3C compositing implies it's a non-issue by silently assuming
sRGB compositing, even in conflict with some of SVG and PNG.
So, whatever the actual choice to go with [which is probably the
simple but wrong choice as the default or only option], please make it
explicit and well-documented, thus climbing up to 2 in the above
order. I volunteer to provide input if that's what is missing.
Cheers,
Simon
My thoughts are that the compositing spec should include a note for
authors stating:
- to achieve high quality/accurate colour output, all operations need to
be performed in a linear colour space
- the default colour space is non-linear sRGB
- the colour space for compositing operations can be controlled with the
color-interpolation property
Then it is up to implementations to implement color-interpolation.
I would like to add this wording to the next version of the spec - level
2. I don't think it's worth revising the current CR since the advice
cannot be acted upon currently.
Would you be happy with this? And what do others think?
Indeed I would be very happy with such wording added. Allow me to
suggest to add a reference to [1], it's an insightful and handy piece
that is actually helpful when pondering these issues.
Cheers,
Simon
[1] J. F. Blinn, “A ghost in a snowstorm [computer graphics],” IEEE
Computer Graphics and Applications, vol. 18, no. 1, pp. 79–84, Jan. 1998.