Android Question working with images

David Troup

Member
Licensed User
Longtime User
Can anyone tell me how to express what is below in Visual Basic 2010 into B4A terms please and how to work with images? I do not want to "download them from the web", just work with what I have got on file and introduce them into my code.

"PictureBox1.Image = Image.FromFile("C:\Users\David\Documents\Visual Studio 2010\VBProjects\LDR\images\aoc.png")"

Is there anywhere in the documentation, apart from the Beginner's Guide & User's Guide, where EVERYTHING possible in B4A is set out with examples? Can anyone recommend a COMPREHENSIVE book.
Regards,
David.
 

David Troup

Member
Licensed User
Longtime User
It did not like the path. Is "DirDefaultExternal" the one I should use as I got:-
"java.io.FileNotFoundException: /storage/sdcard/Android/data/b4a.xxxxxxx/files/clear.png: open failed: ENOENT (No such file or directory)
I have the image files clearly shown in the Designer window and under Files in the main window.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Seems that the file clear.png is not deployed to your device from your projects files folder.

Maybe you need to add one or both of these lines to your "Project Attributes" region

B4X:
#DebuggerForceStandardAssets: true
#DebuggerForceFullDeployment: true
 
Upvote 0

David Troup

Member
Licensed User
Longtime User
Thanks. I have found the answer and it works - it should be "File.DirAssets" [as it says page 88 in the Beginners guide!!!]
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…