Mark Read Well-Known Member Licensed User Longtime User Jun 19, 2017 #1 I have a series of image files (422 of them, 10MB) which I need to include in my app. What is the best way to do this? They are organised in a series of sub directories. Many thanks.
I have a series of image files (422 of them, 10MB) which I need to include in my app. What is the best way to do this? They are organised in a series of sub directories. Many thanks.
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2017 #2 Create a zip file with a folder named Files. Copy all the folders into the Files folder (in the zip file). Rename the zip file extension to jar. Copy it to the additional libraries folder and reference it with: #AdditionalJar: myimages You can now access the files with: B4X: fx.LoadImage(File.DirAssets, "test/smiley.png") 'test is a folder under the Files folder in the jar. Upvote 0
Create a zip file with a folder named Files. Copy all the folders into the Files folder (in the zip file). Rename the zip file extension to jar. Copy it to the additional libraries folder and reference it with: #AdditionalJar: myimages You can now access the files with: B4X: fx.LoadImage(File.DirAssets, "test/smiley.png") 'test is a folder under the Files folder in the jar.
Mark Read Well-Known Member Licensed User Longtime User Jun 21, 2017 #3 Brilliant Erel!! Maybe worth moving this thread to code snippets? Many thanks. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 21, 2017 #4 You are more than welcome to start a new thread in the code snippets forum for this Upvote 0
Mark Read Well-Known Member Licensed User Longtime User Jun 21, 2017 #5 Forgot that the "\" doesn't work in the filename. Changed it to "/" and everything works great. Upvote 0