B4J Question resize image to actual view (in canvas)

js1234

Member
Licensed User
Longtime User
Hi

How export image from canvas but only actual size of image?!
example:

B4X:
Sub Button1_Action
     Dim fileName As String
     fileName="slika.png"
     Dim out As OutputStream = File.OpenOutput("", fileName, False)
     Canvas1.Snapshot.WriteToStream(out)
     out.Close
End Sub

Here is image slika.png in Canvas1 (=fixed size) sometime smaller sometimes biger ..... how to save image with only actual size and not fixed size of canvas window!?!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…