Page 1 of 1

RGB 2 L

Posted: Tue Oct 25, 2005 7:40 pm
by hdd
Hi to all ,
there some hopes to see included a metod in the Blender.Image module,
to convert RGB to Luminance ?

something like a getPixelL(x,y)

or in getPixelF (x,y) that return something like [r,g,b,a,l]

here a (real simple) pice of Py code for the conversion

def RGB2L(RGB):
R2L = 0.3*RGB[0]
G2L = 0.57*RGB[1]
B2L = 0.11*RGB[2]
L =R2L+G2L+B2L
return L

Thanks in advance
L.

p:S
sorry for my bad english....