POV-Ray : Newsgroups : povray.beta-test : Gamma in POV-Ray 3.6 vs. 3.7 : Re: Gamma in POV-Ray 3.6 vs. 3.7 Server Time
5 Oct 2024 08:23:10 EDT (-0400)
  Re: Gamma in POV-Ray 3.6 vs. 3.7  
From: clipka
Date: 13 Sep 2009 04:28:14
Message: <4aacad1e@news.povray.org>
MDenham schrieb:
> Ive <"ive### [at] lilysoftorg"> wrote:
>> Ive wrote:
>>
>>> And my recommendation would be to reject JCS_CMYK because...
>> Err, this should be "...reject JCS_YCCK..."
>>
>> -Ive
> From what I'm reading elsewhere, Y/Cr/Cb/K can be folded down to Y/Cr/Cb by just
> subtracting K from Y.  (Yes, this means you'd need to potentially support a
> negative luma component in the process of generating the colors at any given
> spot...  but shouldn't the internal calculation not have an issue with that
> anyway, given that negative channel values can crop up in OpenEXR files
> already?)
> 
> Am I reading stuff from people who are grossly misinformed?

Don't know, but the first google result I found on "YCCK" gave this 
information:

"There are a number of issues here. The K channel is an extension of the
Y channel. The question is what is the nature of the the CMYK data?
Is it linear in percent dot? If that is the case, the image you see
should be negative. If the CODEC unfolded the data and reversed it you
have to check if it has also applied gamma correction. If it has, then
you need to apply a gamma 2.2 to the Y and K channels, sum them, and
then apply a gamma .45 to the resultant sum. This is only an
approximation."

So apparently the YCCK color space is to CMYK what YCbCr is to RGB. 
Given that CMYK has something to do with how much ink should be printed 
of which color, which is subject to various conditions such as how much 
bleeding occurs in the paper and all such things, I guess this "just 
subtract K from Y" is more of a kludge than a proper handling.

BTW, I presume that out_color_space will default to JCS_CMYK for such 
files; in that case, POV-Ray will reject those files anyway at present.


Ive, would it be a solution for such cases (but only those) to override 
the out_color_space with JCS_RGB, and have the library do the whole job 
(at the cost of precision)?


As for negative color components, POV-Ray does appear to handle these in 
some sane fashion in *most* cases, but - as it appears to me - not all. 
In particular, I recently saw some indication that shadows cast by 
semi-transparent stuff needs to be revisited on this issue.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.