Re: fade to gray correction

new topic     » goto parent     » topic index » view thread      » older message » newer message

BABOR, JIRI wrote:
>
> Before some smart ass jumps on it, please change 16 to 256, and select an
> appropriate mode. Sorry Jiri

One other thing... the way to calculate the grey level is not just the
average of the red, green and blue.  The book I have says it's red*0.39
+ green*0.41 + blue*0.2.  I think that has to do with the way our eyes
perceive the intensities of each color.

-- generate gray scale
s3={}
for i=1 to length(s2) do
   junk=floor(s2[i][1]*0.39+s2[i][2]*0.41+s2[i][3]*0.2)
   s3=append(s3,repeat(junk,3))
end for


--
                   _____         _____        _____
    ________      /\    \       /\    \      /\    \
   /   \    \    /  \____\     /  \____\    /  \____\
  /  _  \____\  /   / ___/_   /   /____/   /   / ___/_
 /  / \  [___] /   / /\____\ /    \    \  /   / /\____\
 \  \_/ /    / \   \/ / ___/_\     \    \ \   \/ / ___/_
  \    /____/   \    / /\    \\/\   \    \ \    / /\    \
   \   \    \    \   \/  \____\  \   \    \ \   \/  \____\
    \   \    \    \      /    /   \   \____\ \      /    /
     \   \____\    \    /    /     \  /    /  \    /    /
      \  /    /     \  /    /       \/____/    \  /    /
       \/____/       \/____/xseal at harborside.com\/____/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu