Hi,
I write something on a bitmap, loaded with a photo, save it and the resolution is down to 10%. I posted this before, but I forgot something: I do not need to see the graphics on the phone, just save it with a text.
Thank you
I write something on a bitmap, loaded with a photo, save it and the resolution is down to 10%. I posted this before, but I forgot something: I do not need to see the graphics on the phone, just save it with a text.
Thank you
B4X:
Sub Globals
Dim bitbg As Bitmap
Dim bdwBackground As BitmapDrawable
Dim pnl As Panel
Dim cvs As Canvas
end sub
Sub Activity_Create(FirstTime As Boolean)
bitbg.Initialize(File.DirDefaultExternal,"test.png" )
pnl.Initialize("pnl")
Activity.AddView(pnl, 0, 0, 100%x, 100%y)Dim rectDest AsRect
rectDest.Initialize(0, 0, pnl.Width, pnl.Height)
cvs.Initialize (pnl)
cvs.DrawBitmap(bitbg, Null, rectDest)
cvs.DrawText ("test", 120dip, 120dip, Typeface.DEFAULT_BOLD, 50, Colors.Blue, "LEFT")
Dim out AsOutputStream
' test out=File.OpenOutput (Main.outdir,"0test.png",False)
cvs.Bitmap.WriteToStream (out,100,"PNG")
out.Close