Hi all guys
I have in my code 3 imageview in 1 canvas as follow
Each imageview has a png
B4X:
Dim Box as Canvas
Dim Img(5) as Imageview
Activity.AddView(Img(0),0,0,100,100)
Activity.AddView(Img(1),0,100,100,100)
Activity.AddView(Img(2),100,0,100,100)
Box.Initialize(Img(0))
Box.Initialize(Img(1))
Box.Initialize(Img(2))
Dim Out As OutputStream
Out=File.OpenOutput(File.DirDefaultExternal,"xxxxxx.png",False)
Box.Bitmap.WriteToStream(Out,100, "PNG")
Out.Flush
Out.Close
This is view on phone, but saved image is first square only
Can anyone help me to save all squares in a file?
You should create a mutable bitmap (Bitmap.InitializeMutable) and a canvas to draw on this bitmap. You should then draw the ImageViews bitmaps with Canvas.DrawBitmap.
I want to load an image into an imageview, draw some text on it and save it as a new imagefile. Can someone provide a working example how it's done?
Btw B4A is a true masterpiece. Thumbs up for you Erel keep up the good work.
Best regards /Roger.