get images.

Community Forums/Monkey Talk/get images.

Paul "Taiphoz"(Posted 2012) [#1]
can some one show me how to load in all images or files with a given extension into a list or array ?

I am trying to make a Gallery, so it needs to look in an image folder and then load all images *.jpg or *.png into a list when I can then use the paths or file names to actually load the images for display.

just need a quick example or some pointers of what direction to look in, using the demo so building to html5.


Paul "Taiphoz"(Posted 2012) [#2]
	Method LoadImages()
		
		Local List:String[99]
		List = LoadDir[](Self.ImagePath,True,False)
		Print List[1]
		
	End Method


ImagePath being the path to the image folder which could contain unkown number of images.

I get an Error, Identifier LoadDir Not Found!.

Demo 45c, is the version in case anyone needs to know.


Paul "Taiphoz"(Posted 2012) [#3]
OK, it's the target I have selected , found out thanks to Dabz, that the html5 target does not handle that OS stuff.

So in a nut shell what I have is a folder server side full of images, I need to with html5 be able to load the images in that folder into a list or array, when I can then use the path's to actually load the images in for display.

Displaying 5 images at a time.

any ideas ?


BlitzSupport(Posted 2012) [#4]
You probably want to be using something like this to request each image from the server:

http://www.monkeycoder.co.nz/Community/posts.php?topic=137