i use this code ,but saved image have nothing
B4X:
Private pnDraw As B4XView
pnDraw.SetLayoutAnimated(0, 0, 0,600,600)
pnDraw.LoadLayout("CartImg1")
'add test to layout'
Dim Out2 As OutputStream
Out2 = File.OpenOutput(WorkPath,"file-name".jpg", False)
pnDraw.Snapshot.WriteToStream(Out2,80,"JPEG")
Out2.Close