[cairo] Converting to 8 bit black and white

Mike Gran spk121 at yahoo.com
Tue Sep 18 11:51:14 PDT 2012


> From: Timothy Bolton <ifoundthetao at gmail.com>
>I have another question.  How do you convert a surface from color to
> 8 bit black and white?  I've been searching and I cannot seem to find
> a way to convert a surface to black and white.
 
I don't know how you do it in Cairo, but, back in the olden days, we
used the CIE Luminance equation:
gray = 0.21 Red + 0.72 Green + 0.07 blue
 
-Mike


More information about the cairo mailing list