|
![](/i/fill.gif) |
Well, this simple macro seems to be working. It is a combination of your idea and
Ron's pasted code.
#macro Lum( Color )
Color.x*.3
+Color.y*.59
+Color.z*.11
#end
Funny thing, Photoshop's desaturation seems to be goofy. It gives unexpected
results, although the desaturation tool itself seems to be fine.
Warp wrote:
> SamuelT <STB### [at] aol com> 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
|
![](/i/fill.gif) |