Hello,
I used erel solution for snapshot an item (for example - panel) - (https://www.b4x.com/android/forum/threads/save-only-the-image-inside-the-panel.92333/#post-583937)
But the image saved is null - white picture only.
Does anyone know what is the problem and how to fix it?
Thanks in advance
I used erel solution for snapshot an item (for example - panel) - (https://www.b4x.com/android/forum/threads/save-only-the-image-inside-the-panel.92333/#post-583937)
B4X:
Sub Button1_Click
Dim bmp As B4XBitmap = Crop_Image(Panel1, Panel1.left, Panel1.top, Panel1.width, Panel1.height )
Dim out As OutputStream
out = File.OpenOutput(File.DirInternal, "1.png", False)
bmp.WriteToStream(out, 100, "PNG")
out.Close
End Sub
Sub Crop_Image(V As B4XView, left As Int, top As Int, width As Int, height As Int) As Bitmap
Return V.Snapshot.Crop(left, top, width, height)
End Sub
Does anyone know what is the problem and how to fix it?
Thanks in advance