Eben Eliason writes: > Roughly speaking, you can calculate a colored pixel's effective > luminance by: > > Y = 0.3*R+0.59*G+0.11*B
To be clear on why this is rough: it performs an operation on non-linear data which is only valid on linear data. That is, it ignores gamma. >From best to worst: a. convert to linear, Y = 0.3*R+0.59*G+0.11*B, convert back b. square, Y = 0.3*R+0.59*G+0.11*B, square root c. Y = 0.3*R+0.59*G+0.11*B d. Y = (R+G+G+B)>>2 e. Y = G FYI, most interesting image operations are only valid on linear data. This includes scaling and alpha blending. Lots of programmers degrade images by screwing this up. We should all try to do better, especially when the image is something that might be important to the user. _______________________________________________ Sugar mailing list [email protected] http://lists.laptop.org/listinfo/sugar

