Stippling Polygons

I was wondering if there was any program, or anyway, to take a black and white bitmap and convert it into a

GLubyte picture[] { 0xAA, 0xAA … etc };

? =)

Thanks in advance

-Satapher