RGB 2 L

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
hdd
Posts: 0
Joined: Tue Aug 30, 2005 6:24 pm

RGB 2 L

Post 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....

Post Reply