|
|
Ron posted this from the POV source at 6:30:
color = (png_byte)floor((line_data[col][RED]*0.30 +
line_data[col][GREEN]*0.59 +
line_data[col][BLUE]*0.11) * 255.0);
Perhaps I can use your idea+his values to make it work?
Warp wrote:
> SamuelT <STB### [at] aolcom> wrote:
> : It's for the eval_pigment stuff I've been using. I needed to convert a color
> : vector into a float value so I could use it for elevation.
>
> So in practice what you are trying to do is to convert a color to b/w
> (ie. a brightness value).
> There's an exact formula on how each color component affects the brightness,
> and I don't remember exactly the values, but this might be a good
> approximation:
>
> brightness = red*0.25 + green*0.6 + blue*0.15
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|