[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] The Newly Expanded Color Space Issue
On 07/09/2010 07:27, Chris Marrin wrote:
> On Sep 6, 2010, at 1:43 PM, stephen white wrote:
>> Perhaps we're missing a point here... the colour of the pixels are in sRGB, while the values of the pixels are linear. Two different things.
> I don't understand this distinction at all, and perhaps this is my problem!
> A pixel value of 128,128,128 in the drawing buffer will give me a particular shade of grey when displayed on a monitor. If the compositor considers it to be a linear buffer, it will perform color correction that will cause that pixel to appear 50% grey. If it considers the drawing buffer to be sRGB, it will perform color correction (or maybe none will be needed) to make that pixel look darker than that (according to the sRGB gamma).
> So if I consider my drawing buffer to be sRGB, I would need a value greater than 128,128,128 to get a display of 50% grey. That gives you a greater range of dark colors, which I believe is Thatcher's argument. But figuring out what pixel value to use to get 50% grey requires extra computations, which I believe is Steve's argument.
> Is there more to it than that?
You have it backwards. sRGB is perceptually linear so a pixel value of
128,128,128 displayed on an sRGB display will be 50% grey (modulo
viewing conditions, surrounding colors etc., etc.). No gamma
"correction" is performed. If buffer is linear, gamma will be applied to
"correct" the value for the sRGB display and the result will actually be
considerably lighter than 50% grey.
I don't get the distinction Steve is trying to make either. But in the
case of the Canvas2D spec & CSS that led to the comment I can see a
distinction between the space in which the CSS colors are specified
(sRGB) and the "space used for ... used for processing any colors for
(the canvas) element in CSS. It does NOT say that the processing must be
done in the color space used to specify the colors. It allows the
browser to choose whatever color space it desires for processing CSS
colors. To get correct blending, a linear space may even be a reasonable
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660