Save 3 Imageview in 1 Canvas

IlCasti

Active Member
Licensed User
Longtime User
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

5os79.png


This is view on phone, but saved image is first square only
Can anyone help me to save all squares in a file?

Thank you!
 

ThRuST

Well-Known Member
Licensed User
Longtime User
Load an image with text (canvas)

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.
 
Upvote 0
Top