Does anyone know a procedure or a tool to convert a B4X view (panel for example) to a JPG or PNG image?
My purpose is to make a help B4XPage for my apps.
Any help is welcome, thanks by advance and beware of hot weather ...
Dim bmp As B4XBitmap = Root.Snapshot
Dim out As OutputStream = File.OpenOutput(xui.DefaultFolder, "image.jpeg", False)
bmp.WriteToStream(out, 100, "JPEG")
out.Close
Dim bmp As B4XBitmap = Root.Snapshot
Dim out As OutputStream = File.OpenOutput(xui.DefaultFolder, "image.jpeg", False)
bmp.WriteToStream(out, 100, "JPEG")
out.Close
? ?? Would it be useful to add a command to the xui library to do this with just one line?
xui.SaveSnapshot(xView As B4XView, [Dir As String], FileName As String, FileType As String)
where Dir would be optional (you should pass an empty string or create two versions of that SaveSnapshot).
FileType should accept "JPEG" or "PNG", of course (constants provided by xui) and this may also be optional.
I think that this is a rhetorical question - one that does not expect an answer. He is saying - "I have a problem; I ask a question in the forum; I get a complete answer that solves my problem .... and then a few minutes later I get an even better answer! How is this possible! What a wonderful forum this is". And he is right.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.