| 
  | 
On occasion, I've found the need to take color samples of digital images in
situations such that using the eyedropper tool is too tedious.  POV-Ray's SDL
provides a convenient way to automate this, but POV-Ray's native color format
isn't always the most useful in other contexts.
I wrote an include file that converts linear colors to sRGB, and converts
integers or colors to hexadecimal strings.  It works POV-Ray 3.5 or later, but I
recommend 3.7, as it gives you easier control of image map gamma.  POV-Ray 3.7
also converts from sRGB to linear, which is not part of this include file.
Usage note:  With rare exceptions, I always use assumed_gamma 1.  I do not know
how relevant this file would be for any settings other than 1.
 
 Post a reply to this message 
 
Attachments: 
Download 'srgb-inc.zip' (2 KB)
 
  
 | 
  | 
 | 
  | 
On 03/25/2014 08:42 PM, Cousin Ricky wrote:
> On occasion, I've found the need to take color samples of digital images in
> situations such that using the eyedropper tool is too tedious.  POV-Ray's SDL
> provides a convenient way to automate this, but POV-Ray's native color format
> isn't always the most useful in other contexts.
>
> I wrote an include file that converts linear colors to sRGB, and converts
> integers or colors to hexadecimal strings.  It works POV-Ray 3.5 or later, but I
> recommend 3.7, as it gives you easier control of image map gamma.  POV-Ray 3.7
> also converts from sRGB to linear, which is not part of this include file.
>
> Usage note:  With rare exceptions, I always use assumed_gamma 1.  I do not know
> how relevant this file would be for any settings other than 1.
There was a typo in macro sRGB_Convert_c() that made it completely 
unusable.  I don't know how it got past testing.  I have attached a 
corrected file.
 
 Post a reply to this message 
 
Attachments: 
Download 'srgb-inc.zip' (2 KB)
 
  
 | 
  |