Dim ww as int = 128 'your display size in pixels
Dim hh as int =64
Dim message as string="Hello"
Dim size as float=5.0 ' you will have to experiment
Dim xpos as int=0
Dim ypos as int = hh/2 + c.measureStringHeight(message,Typeface.DEFAULT,size)/2
Dim B_disp as Bitmap
B_disp.initialize(ww,hh)
Dim c as canvas
c.initialize2(B_disp)
c.DrawColor(Colors.Black)
c.DrawText(message,xpos,ypos,Typeface.DEFAULT,size,Colors.White,"LEFT")
'Now get the pixels
dim myPixels(ww*hh) as byte
for row=0 to hh-1
for col=0 to ww-1
Dim myColor as Int = B.GetPixel(col,row)
If Bit.And(myColor,255)>100 then ' or any other threshold, values can go from 0 to 255
myPixels(ww*row + col)=1
Else
myPixels(ww*row+col)=0
End If
Next
Next