Thanks OReubens,

Indeed this way I can get grayscale. But I didn't understand what you mean saying
The above assumes a actual 16bits of limunessence in a linear scale
If all colors R,G,B have char-type value, the grayscale depth is 8 bit ?

Regards,

Pavel.