B4J Question Save imageview to a file

tufanv

Expert
Licensed User
Longtime User
Hello,

I am checking the codes on this forum but couldnt find a correct one . Can you give an example to save a imageview image to a location c:/pictures for example ?
or a link to related code snippet which I coulnt find ?
Thanks
 

Roycefer

Well-Known Member
Licensed User
Longtime User
The preferred way is
B4X:
Dim out As OutputStream = File.OpenOutput("C:\Pictures", "image.png", False)
iv.Snapshot.WriteToStream(out)
out.Close
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
The save area screenshot with the jAWTRobot library is perhaps overkill but a very competent alternative. If it can be done another way please let us know.
 
Upvote 0
Top