I would like to put some text (numbers) on the Image, but I need to put it on the center of the Image.
anybody can give me an example code?
this works for me
Sub convertTextToImage(t As String ) As Bitmap ' and save to file
' Create a mutable Bitmap (Bitmap.InitializeMutable)
'2. Create a Canvas that draws on this Bitmap (Canvas.Initialize2)
'3. Draw the camera image on this Bitmap (Canvas.DrawImage)
'4. Draw the text (Canvas.DrawText)
'5. Save the image (Canvas.Bitmap.WriteToStream)
Dim mutableBit As Bitmap
mutableBit.InitializeMutable(50%x, 50%x)
Dim can As Canvas
can.Initialize2( mutableBit)
can.DrawText(t ,100dip, 100dip, Typeface.DEFAULT_BOLD ,30,Colors.Black ,"CENTER")
Dim OUT As OutputStream
OUT = File.OpenOutput(File.DirRootExternal,t & ".png", False)
can.Bitmap.WriteToStream( OUT,100,"PNG")
OUT.Close
Return can.Bitmap
End Sub