Android Question Drawing text on jpg image file

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi All,

I am trying to write some text on jpg file. It is writing but on a blank file instead of provided jpg bitmap file.My code is as below.

bmp.InitializeSample(sSelectedFolder,imgFileName,100%x,100%y)
bmp.InitializeMutable(bmp.Width,bmp.Height)
oCanvas.Initialize2(bmp)
oCanvas.DrawText(str,bmp.Width/2,bmp.Height/3,Typeface.DEFAULT_BOLD,25,Colors.ARGB(255,234,116,117),"CENTER")

Dim out As OutputStream
out=File.OpenOutput(sSelectedFolder,imgFileNames,False)
oCanvas.Bitmap.WriteToStream(out,90,"JPEG")
out.Close
Can you pls guide, it seems bitmap is not initializing.

Thanks
Juzer
 

DonManfred

Expert
Licensed User
Longtime User
Please use [CODE]code here...[/CODE] tags when posting code.
 
Upvote 0
Top