iOS Question Capture Panel to imageview and Share

Kope

Active Member
Licensed User
Longtime User
You should use the iXUI library.
Declare both views as B4XView.
Private MyImageView, MyPanel As B4XView
Then use:
MyImageView.SetBitmap(MyPanel.Snapshot)

Tested with B4J, but it should work with B4i and B4A.

Thank @klaus it works but the image got distorted after Clicking Save Button and please, how do i save and share on other platforms
 

Attachments

  • panelToImage.jpeg
    panelToImage.jpeg
    84.4 KB · Views: 197
Upvote 0

klaus

Expert
Licensed User
Longtime User
Snapshot returns a B4XBitmap.
With B4XBitmap.WriteToStream you can save it in a file.
Then, I have no experiene in sharing files between iOS and other platforms.
For the image distortion I suppose that the width / height ratio is not the same.
 
Upvote 0

Kope

Active Member
Licensed User
Longtime User
With B4XBitmap.WriteToStream you can save it in a file.
Thanks so much for the help but a little help on how to save

I have
B4X:
Private MyImageView, MyPanel As B4XView

Sub Save_Click
    MyImageView.SetBitmap(MyPanel.Snapshot)
    Dim bmp As B4XBitmap = Panel5.Snapshot
    Dim Out As OutputStream
    Out = File.OpenOutput(File.DirDocuments,"1.jpeg", False)
    bmp.WriteToStream(Out, 100, "JPEG")
    Out.Close
End Sub

i still can't save the images let alone to share

please help me out with example

thanks
 
Last edited:
Upvote 0

Kope

Active Member
Licensed User
Longtime User
I already told you:
I have no experiene in sharing files between iOS and other platforms.
I would have to do the same as you could do: serch in the forum.
Erel gave you a link in post #5
Noted Klaus

Kindly help me out with how to save using b4xBitmap.writetostream. I have tried but could not get it working #6
Thank You
 
Upvote 0
Top